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/couchlight.yaml | 90 +++++++++++++++++++++++++++++++----------- 1 file changed, 66 insertions(+), 24 deletions(-) (limited to 'esphome/config/couchlight.yaml') diff --git a/esphome/config/couchlight.yaml b/esphome/config/couchlight.yaml index cfc2f00..4579dc9 100644 --- a/esphome/config/couchlight.yaml +++ b/esphome/config/couchlight.yaml @@ -1,5 +1,10 @@ +substitutions: + device_name: couchlight + friendly_name: "Couch Light" + esphome: - name: couchlight + name: ${device_name} + friendly_name: ${friendly_name} on_boot: then: - lock.template.publish: @@ -32,30 +37,67 @@ wifi: # Enable fallback hotspot (captive portal) in case wifi connection fails ap: - ssid: "Couchlight Fallback Hotspot" + ssid: "${device_name} Fallback Hotspot" password: !secret wifi_ap_password captive_portal: light: - - id: light1 - platform: binary - name: "Couch 1" + - platform: binary + id: light1 + name: "Spot 1" output: relay_light1 - - id: light2 - platform: binary - name: "Couch 2" + - platform: binary + id: light2 + name: "Spot 2" output: relay_light2 output: - - id: relay_light1 - platform: gpio - pin: D1 + - platform: gpio + id: relay_light1 + pin: D1 # GPIO5 + + - platform: gpio + id: relay_light2 + pin: D2 # GPIO4 - - id: relay_light2 - platform: gpio - pin: D2 + # UNUSED GPIO + - platform: gpio + id: unused_gpio0 + pin: + number: D3 # GPIO0 + mode: INPUT_PULLUP + - platform: gpio + id: unused_gpio1 + pin: + number: TX # GPIO1 + mode: INPUT_PULLUP + - platform: gpio + id: unused_gpio2 + pin: + number: D4 # GPIO2 + mode: INPUT_PULLUP + - platform: gpio + id: unused_gpio3 + pin: + number: RX # GPIO3 + mode: INPUT_PULLUP + - platform: gpio + id: unused_gpio14 + pin: + number: D5 # GPIO14 + mode: INPUT_PULLUP + - platform: gpio + id: unused_gpio15 + pin: + number: D8 # GPIO15 + mode: INPUT_PULLUP + - platform: gpio + id: unused_gpio16 + pin: + number: D0 # GPIO16 + mode: INPUT_PULLDOWN script: - id: reset_child_lock @@ -67,11 +109,11 @@ script: state: UNLOCKED binary_sensor: - - id: button_light1 - name: "Couch 1 PushButton" - platform: gpio + - platform: gpio + id: button_light1 + name: "Spot 1 PushButton" pin: - number: D7 + number: D7 # GPIO13 mode: INPUT_PULLUP filters: - invert @@ -85,11 +127,11 @@ binary_sensor: - light.toggle: light1 internal: true # hide from UI - - id: button_light2 - name: "Couch 2 PushButton" - platform: gpio + - platform: gpio + id: button_light2 + name: "Spot 2 PushButton" pin: - number: D6 + number: D6 # GPIO12 mode: INPUT_PULLUP filters: - invert @@ -104,8 +146,8 @@ binary_sensor: internal: true # hide from UI lock: - - id: child_lock - platform: template + - platform: template + id: child_lock name: "Child Lock" optimistic: true on_lock: -- cgit v1.2.3