From 2d8b6496eb37e4ba02f7179e85c86028cd34f4e5 Mon Sep 17 00:00:00 2001 From: Colin Brown Date: Wed, 25 Feb 2026 15:37:06 +0000 Subject: [PATCH] Update README to reference external YAML configuration and remove inline ESPHome config --- README.md | 79 +---------------------------------------------- pixelbrain32.yaml | 74 ++++++++++++++++++++++++++++++++++++++++++++ 2 files changed, 75 insertions(+), 78 deletions(-) create mode 100644 pixelbrain32.yaml diff --git a/README.md b/README.md index 57ec4b1..df13c1f 100644 --- a/README.md +++ b/README.md @@ -133,84 +133,7 @@ ESP32 GPIO32 ─────────────────┤ ## ESPHome Configuration -```yaml -esphome: - name: pixelbrain32 - friendly_name: PixelBrain32 - -esp32: - board: esp32dev - framework: - type: arduino - -# Enable logging -logger: - -# Enable Home Assistant API -api: - encryption: - key: !secret api_encryption_key - -ota: - - platform: esphome - password: !secret ota_password - -wifi: - ssid: !secret wifi_ssid - password: !secret wifi_password - ap: - ssid: "PixelBrain32 Fallback" - password: !secret ap_password - -captive_portal: - -light: - - platform: neopixelbus - type: GRB - variant: WS2812X - pin: GPIO16 # adjust to your data output GPIO - num_leds: 60 # adjust to your strip length - name: "LED Strip" - id: strip_light - default_transition_length: 500ms - restore_mode: ALWAYS_OFF # prevents strip turning on after power loss or reboot - -binary_sensor: - - platform: gpio - pin: - number: GPIO33 - mode: INPUT_PULLUP - inverted: true - name: "LED Toggle Button" - on_press: - then: - - light.toggle: strip_light - - - platform: gpio - pin: - number: GPIO32 - mode: INPUT_PULLUP - inverted: true - name: "LED Brightness Button" - on_multi_click: - # Short press → brightness up 25% - - timing: - - ON for at most 350ms - - OFF for at least 50ms - then: - - light.dim_relative: - id: strip_light - relative_brightness: 25% - transition_length: 300ms - # Long press → brightness down 25% - - timing: - - ON for at least 500ms - then: - - light.dim_relative: - id: strip_light - relative_brightness: -25% - transition_length: 300ms -``` +See [pixelbrain32.yaml](pixelbrain32.yaml). --- diff --git a/pixelbrain32.yaml b/pixelbrain32.yaml new file mode 100644 index 0000000..bc752cb --- /dev/null +++ b/pixelbrain32.yaml @@ -0,0 +1,74 @@ +esphome: + name: pixelbrain32 + friendly_name: PixelBrain32 + +esp32: + board: esp32dev + framework: + type: arduino + +logger: + +api: + encryption: + key: !secret api_encryption_key + +ota: + - platform: esphome + password: !secret ota_password + +wifi: + ssid: !secret wifi_ssid + password: !secret wifi_password + ap: + ssid: "PixelBrain32 Fallback" + password: !secret ap_password + +captive_portal: + +light: + - platform: neopixelbus + type: GRB + variant: WS2812X + pin: GPIO16 # adjust to your data output GPIO + num_leds: 60 # adjust to your strip length + name: "LED Strip" + id: strip_light + default_transition_length: 500ms + restore_mode: ALWAYS_OFF # prevents strip turning on after power loss or reboot + +binary_sensor: + - platform: gpio + pin: + number: GPIO33 + mode: INPUT_PULLUP + inverted: true + name: "LED Toggle Button" + on_press: + then: + - light.toggle: strip_light + + - platform: gpio + pin: + number: GPIO32 + mode: INPUT_PULLUP + inverted: true + name: "LED Brightness Button" + on_multi_click: + # Short press → brightness up 25% + - timing: + - ON for at most 350ms + - OFF for at least 50ms + then: + - light.dim_relative: + id: strip_light + relative_brightness: 25% + transition_length: 300ms + # Long press → brightness down 25% + - timing: + - ON for at least 500ms + then: + - light.dim_relative: + id: strip_light + relative_brightness: -25% + transition_length: 300ms