Racking my brain on this one. Had the below automation working for literally a year with NO problems.
The sensor triggers, automation sees the trigger
Condition passes
Lights not triggered.
I check traces it shows “stopped because only a single execution”. Immediately after I can trigger the lights with my dashboard or with my ZHA wireless button with no problem. No long running execution.
The only thing I can think of is one of the updates borked something, but I have no idea what.
alias: Action - Patio lights Slide Door Open
description: ""
trigger:
- platform: state
entity_id:
- binary_sensor.lumi_lumi_sensor_magnet_aq2_opening
from: null
to: "on"
condition:
- condition: sun
before: sunrise
after: sunset
action:
- type: turn_on
device_id: c3da17062f27d5ecac4bb21bd0b36869
entity_id: 4965649777d6ac3bc35b07831a7a8979
domain: light
mode: single
After some extensive troubleshooting there is definitely something going on with, at least, ZHA “devices”. If you see from my original script, I was setting the trigger using “device” methodology and that wasn’t working even though the trigger was showing.
I then “disabled” that trigger and added another one but looking for the ZHA event using manual listening. The script still failed, but after reading the logs it stated the automation contained an unavailable entity and wouldn’t run even though that trigger was disabled.
So I then removed that trigger entirely and found it still didn’t work, but the logs updated with the same message. Something was “sticking”.
I then restarted the containers and now everything is working, using my manual ZHA listening trigger. While this works as a workaround, I shouldn’t have had to do it at all.
Post the problem as a new Issue in Home Assistant’s GitHub Core repository. That’s where suspected software bugs are reported and (often) resolved by the development team.