You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
I have a few scripts with the state trigger that stopped working once I updated to 2024.10.
These were working before. the time_trigger does work as expected.
example of the state_trigger
@state_trigger("light.hallway_light_1.*")deftest1(**args):
log.info(f"light changed {args}")
@state_trigger("binary_sensor.hallway_motion_sensor_occupancy")defmotion_state_changed(**args):
log.info("something is present")
context=args["context"]
ifhallway.enable_debug():
log.debug(
f"[{hallway.name()}] Presence sensor binary_sensor.hallway_motion_sensor_occupancy was triggered with state {args['value']} from {context.parent_id}"
)
ceiling_light_flow()
The text was updated successfully, but these errors were encountered:
I haven't used @state_trigger("light.hallway_light_1.*") with the asterisk, it does not work for me now, but I don't know whether it worked before. @state_trigger("binary_sensor.hallway_motion_sensor_occupancy") works OK for me while I'm on 2024.10.0
None of my triggers failed after the update to 2024.10.0
Something is wrong with my pyscript then, tried also for the light without the *, tried adding test state changes to buttons and all of them are not working.
I cannot see any error.
I have tried to remove/reinstall pyscript
Reboted the home assistant
And still have the same issue
So for other people that might struggle with this. I had a trigger that was part of a factory, these had some init to get the entity state. on start these entities might not be available so the state.getattr() or state.get() returns none. I was not checking this and the pyscript would not load the trigger.
I have a few scripts with the state trigger that stopped working once I updated to 2024.10.
These were working before. the time_trigger does work as expected.
example of the state_trigger
The text was updated successfully, but these errors were encountered: