From 5e89b866b4795dca80b36f9a33bcc95add742b68 Mon Sep 17 00:00:00 2001 From: Nicolas Bachschwell Date: Wed, 1 May 2024 12:35:11 +0200 Subject: [PATCH] That is the new nbs mainlight config which replaced the old tasmota config of my light switch --- light_switch.yaml | 50 +++++++++++++++++++++++++++++++++++++++++++++++ 1 file changed, 50 insertions(+) create mode 100644 light_switch.yaml diff --git a/light_switch.yaml b/light_switch.yaml new file mode 100644 index 0000000..89dd6c1 --- /dev/null +++ b/light_switch.yaml @@ -0,0 +1,50 @@ +esphome: + name: nbs-mainlight + +esp8266: + board: esp01_1m + +wifi: + ssid: !secret wifi_ssid + password: !secret wifi_password + +api: + encryption: + key: !secret ml_key + +ota: + password: !secret ml_password + +logger: + +binary_sensor: + - platform: gpio + pin: + number: GPIO0 + mode: + input: true + pullup: true + inverted: true + id: button_1 + on_press: + then: + - light.toggle: light_1 + + - platform: status + name: "T1 Status" + +output: + - platform: gpio + pin: GPIO12 + id: relay_1 + +light: + - platform: binary + name: Main Light + id: light_1 + output: relay_1 + +status_led: + pin: + number: GPIO13 + inverted: no \ No newline at end of file