diff options
Diffstat (limited to 'hostnix/elmo/home-assistant.nix')
| -rw-r--r-- | hostnix/elmo/home-assistant.nix | 31 |
1 files changed, 31 insertions, 0 deletions
diff --git a/hostnix/elmo/home-assistant.nix b/hostnix/elmo/home-assistant.nix index a62fcd5..de04db2 100644 --- a/hostnix/elmo/home-assistant.nix +++ b/hostnix/elmo/home-assistant.nix @@ -590,6 +590,37 @@ ]) (button "binary_sensor.bedroom_button_2" (ha.action.toggle "switch.wakko")) + + # The panel light can become unresponsive and need to be reboot. + { + alias = "Panel light reinitialize"; + trigger = [ + { + platform = "state"; + entity_id = [ "light.panel_light" ]; + to = "unavailable"; + } + ]; + action = [ + { + repeat = { + while = [ + { + condition = "state"; + entity_id = "light.panel_light"; + state = "unavailable"; + } + ]; + sequence = [ + (ha.action.off "switch.dot") + { delay = 10; } + (ha.action.on "switch.dot") + { delay = 30; } + ]; + }; + } + ]; + } ]; }; }; |
