listen_state should take into account entity's last_changed
for immediate triggers
#2186
Open
1 task done
Labels
enhancement
New feature or request
Is there an existing feature request for this?
Your feature request
Currently, for
immediate
listen_state
s, AppDaemon will wait at least the specifiedduration
after AppDaemon's start (or trigger creation) before running the trigger, even if we can know that we can actually wait for less time and still be sure that the state we are listening for has not changed for longer than that time.To solve this, when registering a
listen_state
, we could look at entity'slast_changed
that comes back from HomeAssistant's API when choosing how long to actually wait for.This would make such triggers survive AppDaemon reboots/reloads much better, as it would mean that such triggers could typically recover their "I've already waited for this long" state.
The text was updated successfully, but these errors were encountered: