Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- esphome:
- name: affugter
- platform: ESP8266
- board: esp01_1m
- wifi:
- ssid: "xxx"
- password: "xxx"
- # Enable logging
- logger:
- # Enable Home Assistant API
- api:
- ota:
- binary_sensor:
- - platform: gpio
- pin:
- number: GPIO0
- mode: INPUT_PULLUP
- inverted: True
- name: "Affugter knap"
- on_press:
- - switch.turn_off: relay
- - delay: 250ms
- - switch.turn_on: relay
- - platform: gpio
- pin:
- number: GPIO14
- mode: INPUT_PULLUP
- inverted: True
- name: "Affugter power"
- device_class: power
- switch:
- - platform: gpio
- pin: GPIO12
- id: relay
- - platform: template
- id: relayed
- icon: "mdi:flash"
- name: "Affugter relay"
- turn_on_action:
- - switch.turn_on: relay
- - delay: 250ms
- - switch.turn_off: relay
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement