reefab-homeassistant-velux/velux.yaml

103 lines
1.8 KiB
YAML

esphome:
name: sonoff4chpro
platform: ESP8266
board: esp01_1m
wifi:
ssid: !secret wifi_ssid
password: !secret wifi_password
logger:
api:
ota:
binary_sensor:
- platform: gpio
id: button_1
pin:
number: GPIO0
mode: INPUT_PULLUP
inverted: true
on_press:
- cover.open: velux_1
- platform: gpio
id: button_2
pin:
number: GPIO9
mode: INPUT_PULLUP
inverted: true
on_press:
- cover.close: velux_1
- platform: gpio
id: button_3
pin:
number: GPIO10
mode: INPUT_PULLUP
inverted: true
on_press:
- cover.open: velux_2
- platform: gpio
id: button_4
pin:
number: GPIO14
mode: INPUT_PULLUP
inverted: true
on_press:
- cover.close: velux_2
- platform: status
name: "Sonoff 4CH Pro Status"
output:
- platform: esp8266_pwm
id: blue_led
pin: GPIO13
inverted: true
light:
- platform: monochromatic
name: "Blue LED"
output: blue_led
switch:
- platform: gpio
pin: GPIO12
id: "relay_1"
- platform: gpio
pin: GPIO5
id: "relay_2"
- platform: gpio
pin: GPIO4
id: "relay_3"
- platform: gpio
pin: GPIO15
id: "relay_4"
cover:
- platform: template
id: velux_1
name: "Velux 1"
open_action:
- switch.turn_off: relay_2
- switch.turn_on: relay_1
close_action:
- switch.turn_off: relay_1
- switch.turn_on: relay_2
stop_action:
- switch.turn_off: relay_1
- switch.turn_off: relay_2
optimistic: true
- platform: template
id: velux_2
name: "Velux 2"
open_action:
- switch.turn_off: relay_4
- switch.turn_on: relay_3
close_action:
- switch.turn_off: relay_3
- switch.turn_on: relay_4
stop_action:
- switch.turn_off: relay_3
- switch.turn_off: relay_4
optimistic: true