Originally posted this in https://discord.com/channels/330944238910963714/1289180644294787142 - it was suggested that I cross-post here since it's related to the App on my Android phone.
I have an automation that resets a counter when I unplug my phone. It's been working great until this morning. I woke up (and took my phone off the charger) at 06:28 when my alarm went off, but the automation ran at 06:55.
Any ideas what could have caused this? It's been running fine for quite some time - including yesterday morning.
alias: FreeMan is awake
description: >-
Reset light dimming when phone unplugged between 4am and 1hr after
sunrise
trigger:
- type: not_plugged_in
platform: device
device_id: 0de3dc2943fa2181779f2b0378115fde
entity_id: 80a5b5d22d86d3ae9ddcdcdbc604ccd6
domain: binary_sensor
condition:
- condition: sun
before: sunrise
before_offset: "+1:00:00"
enabled: true
action:
- data: {}
target:
entity_id: counter.morninglightdivisor
action: counter.reset
mode: single
(Yes, I know the comment says after 4am, but there's no code to support that. The problem with comments...)
Attached is the logbook entry and the trace timeline showing when it actually triggered.
As suggested in the original post, I've confirmed that there was no OS update overnight (though that's happened before and the event still fired as expected) and I've confirmed that the setting to allow HA to run in the background at all times is on.