Created
September 20, 2021 20:24
-
-
Save stefanjenkner/110c706aef9512c5cf22337829e27406 to your computer and use it in GitHub Desktop.
ESPHome OBI Socket 2
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
esphome: | |
name: obi-socket2-example | |
platform: ESP8266 | |
board: esp01_1m | |
substitutions: | |
friendly_name: "OBI Socket 2 Example" | |
binary_sensor: | |
- platform: gpio | |
pin: | |
number: GPIO5 | |
mode: INPUT_PULLUP | |
inverted: true | |
id: button | |
on_press: | |
switch.toggle: relay | |
- platform: status | |
name: "${friendly_name} Status" | |
switch: | |
- platform: gpio | |
pin: GPIO13 | |
id: red_led | |
- platform: gpio | |
name: "${friendly_name}" | |
pin: GPIO4 | |
id: relay | |
on_turn_on: | |
- switch.turn_on: red_led | |
on_turn_off: | |
- switch.turn_off: red_led | |
status_led: | |
pin: | |
number: GPIO12 | |
inverted: true | |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment