From 41fa305d10795d53eefb9d8e8c39121512e24010 Mon Sep 17 00:00:00 2001 From: Tim Meneely Date: Thu, 23 Apr 2026 09:23:17 -0400 Subject: [PATCH] Creating new files for our nightstand lights --- nightstand.bat | 2 + nightstandljm.yaml | 91 ++++++++++++++++++++++++++++++++++++++++++++++ nightstandtkm.yaml | 90 +++++++++++++++++++++++++++++++++++++++++++++ 3 files changed, 183 insertions(+) create mode 100644 nightstand.bat create mode 100644 nightstandljm.yaml create mode 100644 nightstandtkm.yaml diff --git a/nightstand.bat b/nightstand.bat new file mode 100644 index 0000000..9f69f9c --- /dev/null +++ b/nightstand.bat @@ -0,0 +1,2 @@ +esphome run .\nightstandtkm.yaml --device 192.168.87.45 +esphome run .\nightstandljm.yaml --device 192.168.87.41 \ No newline at end of file diff --git a/nightstandljm.yaml b/nightstandljm.yaml new file mode 100644 index 0000000..b428770 --- /dev/null +++ b/nightstandljm.yaml @@ -0,0 +1,91 @@ +substitutions: + device_name: nightstandljm + #device_ip: 192.168.87.45 + +esphome: + name: ${device_name} + +esp8266: + board: esp8285 + +# Enable logging +logger: + +# Enable Home Assistant API +api: + encryption: + key: "RxgR/v9F6OQQmn37bnfqvgWlb2Img/TXKPFrHV88Cu8=" +# key: "EgFzta0ZRgjSLEAfkzFDFlzs2ZDcs+2sD5LL7vSHSmE=" + +ota: + - platform: esphome + + +wifi: + ssid: "Meneely" + password: "punxsutawney1" + + # Enable fallback hotspot (captive portal) in case wifi connection fails + ap: + ssid: "Nightstand LJM Fallback Hotspot" + password: "punxsutawney1" + +captive_portal: + + +####################################### +# Device specific Config Begins Below # +####################################### + +binary_sensor: + - platform: gpio + pin: GPIO00 # The built-in switch + id: reset + internal: true + filters: + - invert: + - delayed_off: 10ms + on_press: + - switch.toggle: + id: relay_1 + + - platform: gpio + name: ${device_name}_status + pin: GPIO04 # The external terminals + id: switch_1 + filters: + - delayed_on: 100ms + on_press: + then: + - switch.toggle: + id: relay_1 + # on_release: + # then: + # - switch.toggle: + # id: relay_1 + +switch: + - platform: gpio + name: ${device_name}_switch + icon: "mdi:lightbulb_outline" + pin: GPIO12 + id: relay_1 + restore_mode: restore_default_off + +#status_led: +# pin: +# number: GPIO13 +# inverted: true + +output: + - platform: esp8266_pwm + id: blue_led + pin: GPIO13 + inverted: True + +light: + # the 4 lines below define the Blue LED light on Sonoff Mini, to expose in HomeAssistant remove line "internal: true" + - platform: monochromatic + name: ${device_name}_blueled + output: blue_led + internal: true # hides the Blue LED from HomeAssistant diff --git a/nightstandtkm.yaml b/nightstandtkm.yaml new file mode 100644 index 0000000..9eb6a2e --- /dev/null +++ b/nightstandtkm.yaml @@ -0,0 +1,90 @@ +substitutions: + device_name: nightstandtkm + #device_ip: 192.168.87.45 + +esphome: + name: ${device_name} + +esp8266: + board: esp8285 + +# Enable logging +logger: + +# Enable Home Assistant API +api: + encryption: + key: "EgFzta0ZRgjSLEAfkzFDFlzs2ZDcs+2sD5LL7vSHSmE=" + +ota: + - platform: esphome + + +wifi: + ssid: "Meneely" + password: "punxsutawney1" + + # Enable fallback hotspot (captive portal) in case wifi connection fails + ap: + ssid: "Nightstand TKM Fallback Hotspot" + password: "punxsutawney1" + +captive_portal: + + +####################################### +# Device specific Config Begins Below # +####################################### + +binary_sensor: + - platform: gpio + pin: GPIO00 # The built-in switch + id: reset + internal: true + filters: + - invert: + - delayed_off: 10ms + on_press: + - switch.toggle: + id: relay_1 + + - platform: gpio + name: ${device_name}_status + pin: GPIO04 # The external terminals + id: switch_1 + filters: + - delayed_on: 100ms + on_press: + then: + - switch.toggle: + id: relay_1 + # on_release: + # then: + # - switch.toggle: + # id: relay_1 + +switch: + - platform: gpio + name: ${device_name}_switch + icon: "mdi:lightbulb_outline" + pin: GPIO12 + id: relay_1 + restore_mode: restore_default_off + +#status_led: +# pin: +# number: GPIO13 +# inverted: true + +output: + - platform: esp8266_pwm + id: blue_led + pin: GPIO13 + inverted: True + +light: + # the 4 lines below define the Blue LED light on Sonoff Mini, to expose in HomeAssistant remove line "internal: true" + - platform: monochromatic + name: ${device_name}_blueled + output: blue_led + internal: true # hides the Blue LED from HomeAssistant