diff options
Diffstat (limited to 'hostnix/elmo/home-assistant.nix')
| -rw-r--r-- | hostnix/elmo/home-assistant.nix | 29 |
1 files changed, 27 insertions, 2 deletions
diff --git a/hostnix/elmo/home-assistant.nix b/hostnix/elmo/home-assistant.nix index 9b99b04..4867cc1 100644 --- a/hostnix/elmo/home-assistant.nix +++ b/hostnix/elmo/home-assistant.nix @@ -317,19 +317,44 @@ trigger = "state"; entity_id = [ "binary_sensor.fridge_door_sensor" ]; to = [ "on" ]; - for.minutes = 1; + for.minutes = 2; } ]; actions = [ { action = "notify.notify"; - data.message = "Check fridge door"; + data = { + message = "Check fridge door"; + data = { + tag = "fridge-door"; + push.interruption_level = "critical"; + }; + }; } (ha.action.toggle "light.panel_light") { delay.milliseconds = 500; } (ha.action.toggle "light.panel_light") ]; } + { + alias = "Fridge door closed"; + triggers = [ + { + trigger = "state"; + entity_id = [ "binary_sensor.fridge_door_sensor" ]; + to = [ "off" ]; + } + ]; + actions = [ + { + action = "notify.notify"; + data = { + message = "clear_notification"; + data.tag = "fridge-door"; + }; + } + ]; + } # The panel light can become unresponsive and need to be reboot. { |
