From 24041448de14bea3308effffaa04174c6920ea5d Mon Sep 17 00:00:00 2001 From: void Date: Thu, 20 Mar 2025 23:54:56 +0000 Subject: [PATCH] Add watchwip buttons all wrong --- watchwip | 81 ++++++++++++++++++++++++++++++++++++++++++++++++++++++++ 1 file changed, 81 insertions(+) create mode 100644 watchwip diff --git a/watchwip b/watchwip new file mode 100644 index 0000000..0954240 --- /dev/null +++ b/watchwip @@ -0,0 +1,81 @@ +esphome: + name: esphome-web-ad0671 + friendly_name: WATCH + min_version: 2024.11.0 + name_add_mac_suffix: false + +esp8266: + board: esp01_1m + +# Enable logging +logger: + +# Enable Home Assistant API +api: + +# Allow Over-The-Air updates +ota: + platform: esphome + +wifi: + ssid: "DNTD" + password: "wifipassword" + ap: + ssid: "Mini-Display-Tv--Yellow" + password: "wifipassword" + +font: + - file: "gfonts://Bytesized" + id: font1 + size: 8 + +light: + - platform: neopixelbus + name: "WS2812B LED" + id: ws2812b + pin: GPIO15 + num_leds: 1 # Adjust the number of LEDs as per your setup + type: GRB # Set the color order if needed (e.g., GRB for WS2812B) + variant: WS2812 # Specify the variant (WS2812 for WS2812B) + +i2c: + sda: GPIO5 # D1 + scl: GPIO4 # D2 + scan: true + +display: + - platform: ssd1306_i2c + model: "SH1106 128x64" + id: sh1106_display + update_interval: 1s + address: 0x3C # Default I2C address for SH1106 + lambda: |- + it.print(0, 0, id(font1), "ESPHome Watch"); + +# Buttons configuration +binary_sensor: + - platform: gpio + pin: GPIO0 # Possibly DP09, assuming GPIO0 is used + name: "Button Up" + on_press: + - light.toggle: ws2812b + - platform: gpio + pin: GPIO2 # Possibly DP10, assuming GPIO2 is used + name: "Button Down" + on_press: + - light.toggle: ws2812b + - platform: gpio + pin: GPIO16 # Button A (changed from GPIO4 to GPIO16) + name: "Button A" + on_press: + - light.toggle: ws2812b + - platform: gpio + pin: GPIO12 # Side Button 1 (kept as is) + name: "Side Button 1" + on_press: + - light.toggle: ws2812b + - platform: gpio + pin: GPIO14 # Side Button 2 (kept as is) + name: "Side Button 2" + on_press: + - light.toggle: ws2812b