Power cycle button for myStrom relays

This can be used to power cycle critical infrastructure, which may
render the switch unavailable if turned off.
This commit is contained in:
2026-05-03 10:33:00 +00:00
parent d4c1cdf8db
commit c3cb5cb54a
+19
View File
@@ -63,6 +63,25 @@ binary_sensor:
then:
- switch.toggle: mystrom_relay
script:
- id: power_cycle_relay
mode: single
then:
- if:
condition:
switch.is_on: mystrom_relay
then:
- switch.turn_off: mystrom_relay
- delay: 7s
- switch.turn_on: mystrom_relay
button:
- platform: template
name: "Power cycle relay"
icon: "mdi:restart"
on_press:
- script.execute: power_cycle_relay
sensor:
- platform: pulse_counter
pin: 4