diff --git a/esphome/data/config/sthome-ut1.yaml b/esphome/data/config/sthome-ut1.yaml index c6c5d53..99d5e0d 100644 --- a/esphome/data/config/sthome-ut1.yaml +++ b/esphome/data/config/sthome-ut1.yaml @@ -47,3 +47,55 @@ wifi: password: "7SglIlgdkpAD" captive_portal: + +#preferences: +# flash_write_interval: 30s + +switch: + - platform: gpio + pin: + number: GPIO16 + inverted: true + id: relay1 + name: "Relay 1" + icon: "mdi:run-fast" + restore_mode: RESTORE_DEFAULT_OFF + on_turn_on: + - delay: 1000ms + - switch.turn_off: relay1 + + - platform: gpio + pin: + number: GPIO17 + inverted: true + id: relay2 + name: "Relay 2" + icon: "mdi:run-fast" + restore_mode: RESTORE_DEFAULT_OFF + on_turn_on: + - delay: 1000ms + - switch.turn_off: relay2 + + - platform: gpio + pin: + number: GPIO18 + inverted: true + id: relay3 + name: "Relay 3" + icon: "mdi:run-fast" + restore_mode: RESTORE_DEFAULT_OFF + on_turn_on: + - delay: 1000ms + - switch.turn_off: relay3 + + - platform: gpio + pin: + number: GPIO19 + inverted: true + id: relay4 + name: "Relay 4" + icon: "mdi:run-fast" + restore_mode: RESTORE_DEFAULT_OFF + on_turn_on: + - delay: 1000ms + - switch.turn_off: relay4