Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- esphome:
- name: socket_d
- platform: ESP8266
- board: esp8285
- wifi:
- ssid: ...
- password: ...
- domain: ".lan"
- logger:
- api:
- password: '...'
- ota:
- password: '...'
- web_server:
- port: 80
- switch:
- - platform: gpio
- pin: GPIO14
- internal: false
- id: relay
- name: "Bedroom fan"
- icon: "mdi:fan"
- on_turn_on:
- - switch.turn_on: blue_led
- - delay: 200ms
- - switch.turn_off: blue_led
- on_turn_off:
- - switch.turn_on: red_led
- - delay: 200ms
- - switch.turn_off: red_led
- - platform: gpio
- pin: GPIO3
- id: red_led
- inverted: true
- - platform: gpio
- pin: GPIO13
- id: blue_led
- inverted: true
- binary_sensor:
- - platform: gpio
- name: button
- pin:
- number: GPIO1
- inverted: true
- on_press:
- - switch.toggle: relay
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement