Advertisement
Skeem

esphome affugter

May 14th, 2023 (edited)
1,042
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
YAML 0.82 KB | None | 0 0
  1. esphome:
  2.   name: affugter
  3.   platform: ESP8266
  4.   board: esp01_1m
  5.  
  6. wifi:
  7.   ssid: "xxx"
  8.   password: "xxx"
  9.  
  10. # Enable logging
  11. logger:
  12. # Enable Home Assistant API
  13. api:
  14. ota:
  15. binary_sensor:
  16.   - platform: gpio
  17.     pin:
  18.       number: GPIO0
  19.       mode: INPUT_PULLUP
  20.       inverted: True
  21.     name: "Affugter knap"
  22.     on_press:
  23.     - switch.turn_off: relay
  24.     - delay: 250ms
  25.     - switch.turn_on: relay
  26.  
  27.   - platform: gpio
  28.     pin:
  29.       number: GPIO14
  30.       mode: INPUT_PULLUP
  31.       inverted: True
  32.     name: "Affugter power"
  33.     device_class: power
  34.  
  35.  
  36. switch:
  37.   - platform: gpio
  38.     pin: GPIO12
  39.     id: relay
  40.    
  41.   - platform: template
  42.     id: relayed
  43.     icon: "mdi:flash"
  44.     name: "Affugter relay"
  45.     turn_on_action:
  46.     - switch.turn_on: relay
  47.     - delay: 250ms
  48.     - switch.turn_off: relay
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement