From 8803fc919c62c813bc595a16daece978856b5b1a Mon Sep 17 00:00:00 2001 From: Joe Mou Date: Tue, 30 Jun 2026 16:31:30 -0400 Subject: HA: Critical fridge door notification Notification dismissal does not seem to work. --- hostnix/elmo/home-assistant.nix | 29 +++++++++++++++++++++++++++-- 1 file changed, 27 insertions(+), 2 deletions(-) (limited to 'hostnix') 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. { -- cgit v1.3.1