I’m sorry about the dumb question. I’m just getting started with automations and I’ve got an easy one that isn’t working. I have a power monitor that watches the circuit my garage lights are on. I want HA to send an email if those lights stay on for more than 15 minutes. Here’s what I have:
alias: Garage Lights left on
description: ""
trigger:
- type: power
platform: device
device_id: d1be813f1cee43e7d8fe3ff91a6ccbc8
entity_id: sensor.garage_lights_power
domain: sensor
above: 200
for:
hours: 0
minutes: 15
seconds: 0
condition: []
action:
- service: notify.send_email_gmail
data:
message: Someone forgot to shut off the lights in the garage.
title: Shut off garage lights
mode: single
I had the lights on for 23 minutes today and the output was over 200 the whole time.
I see the missing data but I’m not actually sure what causes it. I was hoping that because there is no value as opposed to a value below 200 then HA would still understand the last good value as above 200. Is there anyway around this?
7:02 - 6:48 is 14 minutes. Then you have a gap where the sensor lost connection, then it resumes. That lost connection changed the state from > 200 to unavailable which caused your trigger to never fire.