diff options
| author | Joe Mou <dev@mou.fo> | 2026-06-30 16:31:30 -0400 |
|---|---|---|
| committer | Joe Mou <dev@mou.fo> | 2026-08-11 07:17:05 -0400 |
| commit | 8803fc919c62c813bc595a16daece978856b5b1a (patch) | |
| tree | 1ea6503658861140c09e9b89575bbe098f0a6ff7 /hostnix/elmo | |
| parent | 3be9ee11f957fc9d3f787a3219960fe72dc8123d (diff) | |
HA: Critical fridge door notification
Notification dismissal does not seem to work.
Diffstat (limited to 'hostnix/elmo')
| -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. { |
