From 60391c4fb817a825e71d49a15b5a24b158c5d4d5 Mon Sep 17 00:00:00 2001 From: manuel Date: Tue, 21 Oct 2025 11:24:54 +0200 Subject: add friendly_name everywhere. diable unused GPIO to save power --- esphome/config/hoblight.yaml | 86 ++++++++++++++++++++++++++++++++------------ 1 file changed, 64 insertions(+), 22 deletions(-) (limited to 'esphome/config/hoblight.yaml') diff --git a/esphome/config/hoblight.yaml b/esphome/config/hoblight.yaml index e36bf31..cf2d7e5 100644 --- a/esphome/config/hoblight.yaml +++ b/esphome/config/hoblight.yaml @@ -1,5 +1,16 @@ +substitutions: + device_name: hoblight + friendly_name: "Hob Light" + esphome: - name: hoblight + name: ${device_name} + friendly_name: ${friendly_name} + + devices: + - id: hob_dimmer + name: "Hob Dimmer" + - id: dining_table + name: "Dining Table" esp8266: board: esp01_1m @@ -33,24 +44,24 @@ wifi: # Enable fallback hotspot (captive portal) in case wifi connection fails ap: - ssid: "Hoblight Fallback Hotspot" + ssid: "${device_name} Fallback Hotspot" password: !secret wifi_ap_password captive_portal: light: - - id: dining_table - platform: cwww - name: "Dining Table" + - platform: cwww + device_id: dining_table + name: None cold_white: pwm_w warm_white: pwm_b cold_white_color_temperature: 6536 K warm_white_color_temperature: 2000 K restore_mode: RESTORE_DEFAULT_OFF - - id: hob_dimmer - platform: color_temperature - name: "Hob Dimmer" + - platform: color_temperature + device_id: hob_dimmer + name: None color_temperature: pwm_rxd brightness: pwm_gpio0 cold_white_color_temperature: 6536 K @@ -58,28 +69,28 @@ light: restore_mode: RESTORE_DEFAULT_OFF output: - #- id: pwm_r - # platform: esp8266_pwm + #- platform: esp8266_pwm + # id: pwm_r # pin: GPIO12 # frequency: 1000 Hz - #- id: pwm_g - # platform: esp8266_pwm + #- platform: esp8266_pwm + # id: pwm_g # pin: GPIO15 # frequency: 1000 Hz - - id: pwm_b - platform: esp8266_pwm + - platform: esp8266_pwm + id: pwm_b pin: GPIO14 frequency: 1000 Hz - - id: pwm_w - platform: esp8266_pwm + - platform: esp8266_pwm + id: pwm_w pin: GPIO4 frequency: 1000 Hz - - id: pwm_gpio0 - platform: esp8266_pwm + - platform: esp8266_pwm + id: pwm_gpio0 pin: GPIO0 frequency: 2000 Hz min_power: 0.05 @@ -89,12 +100,43 @@ output: # pin: GPIO1 # frequency: 2000 Hz - - id: pwm_rxd - platform: esp8266_pwm + - platform: esp8266_pwm + id: pwm_rxd pin: GPIO3 frequency: 2000 Hz + - platform: gpio + id: unused_gpio1 + pin: + number: GPIO1 + mode: INPUT_PULLUP + - platform: gpio + id: unused_gpio2 + pin: + number: GPIO2 + mode: INPUT_PULLUP + - platform: gpio + id: unused_gpio12 + pin: + number: GPIO12 + mode: INPUT_PULLUP + - platform: gpio + id: unused_gpio13 + pin: + number: GPIO13 + mode: INPUT_PULLUP + - platform: gpio + id: unused_gpio15 + pin: + number: GPIO15 + mode: INPUT_PULLUP + - platform: gpio + id: unused_gpio16 + pin: + number: GPIO16 + mode: INPUT_PULLDOWN + binary_sensor: - - id: user_button - platform: gpio + - platform: gpio + id: user_button pin: GPIO5 -- cgit v1.2.3