diff --git a/automations.yaml b/automations.yaml index fc9d201..3c097de 100644 --- a/automations.yaml +++ b/automations.yaml @@ -210,43 +210,69 @@ description: Triggers an alert if the fridge or freezer smart plug power consumption drops to 0W for too long. triggers: - - entity_id: + - trigger: numeric_state + entity_id: - sensor.freezer_power + for: + hours: 0 + minutes: 45 + seconds: 0 below: 1 id: freezer_down + - trigger: numeric_state + entity_id: + - sensor.fridge_power for: hours: 0 minutes: 20 seconds: 0 - trigger: numeric_state - - entity_id: - - sensor.fridge_power below: 1 id: fridge_down - for: - hours: 0 - minutes: 20 - seconds: 0 - trigger: numeric_state conditions: [] actions: - - choose: - - conditions: - - condition: trigger - id: freezer_down - sequence: - - action: notify.notify - data: - title: "\U0001F6A8 URGENT: Freezer Power Failure" - message: The Freezer smart plug has drawn 0W of power for over 20 minutes! - Check the physical appliance immediately. - - conditions: + - if: + - condition: trigger + id: freezer_down + then: + - data: + title: "\U0001F6A8 URGENT: Freezer Power Failure" + message: The Freezer smart plug has drawn 0W of power for over 20 minutes! + Check the physical appliance immediately. + action: notify.notify + else: + - if: - condition: trigger id: fridge_down - sequence: - - action: notify.notify - data: + then: + - data: title: "\U0001F6A8 URGENT: Fridge Power Failure" message: The Fridge smart plug has drawn 0W of power for over 20 minutes! Check the physical appliance immediately. + action: notify.notify + else: [] mode: single + variables: + _cafe_metadata: + version: 1 + strategy: native + nodes: + trigger_1780846348490_0_0: + x: 12 + y: 182 + trigger_1780846348490_1_1: + x: 12 + y: 22 + condition_1780846348491_2_2: + x: 312 + y: 92 + action_1780846348491_3_3: + x: 632 + y: 12 + condition_1780846348491_4_4: + x: 632 + y: 172 + action_1780846348491_5_5: + x: 952 + y: 102 + graph_id: 5948b900-b45d-4c2e-ae73-c880acc3a1bf + graph_version: 1