Mercurial > code > home > repos > micro
diff sonoff_light_2.yaml @ 6:477883ce71ec
more boards
author | drewp@bigasterisk.com |
---|---|
date | Thu, 27 Jun 2024 16:25:24 -0700 |
parents | |
children |
line wrap: on
line diff
--- /dev/null Thu Jan 01 00:00:00 1970 +0000 +++ b/sonoff_light_2.yaml Thu Jun 27 16:25:24 2024 -0700 @@ -0,0 +1,40 @@ +esphome: + name: sonoff_2 + platform: esp8266 + board: esp01_1m + +logger: + level: INFO + +wifi: + networks: + - ssid: !secret wifi_ssid + password: !secret wifi_password + +ota: + platform: esphome + +mqtt: + id: mqtt_client + broker: "mqtt2.bigasterisk.com" + +binary_sensor: + - platform: gpio + pin: + number: GPIO0 + mode: INPUT_PULLUP + inverted: True + name: "Sonoff Basic Button" + on_press: + - switch.toggle: relay + +switch: + - platform: gpio + name: "Sonoff Basic Relay" + pin: GPIO12 + id: relay + +status_led: + pin: + number: GPIO13 + inverted: yes