That is the new nbs mainlight config which replaced the old tasmota config of my light switch

This commit is contained in:
Nicolas Bachschwell 2024-05-01 12:35:11 +02:00
parent bdb3ec110f
commit 5e89b866b4
Signed by: NBSgamesAT
GPG Key ID: 2D73288FF7AEED2F

50
light_switch.yaml Normal file
View File

@ -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