Looking for a method for appdaemon to detect state update.
Some background:
Have several wireless temperature sensors reporting in approx 5 minute intervals.
Appdaemon then updates HA with the temperature of the sensor.
If temp sensor doesn’t report in, HA still shows the latest temperature it received from appdaemon which could be hours old.
Therefore need a method to detect if sensor state hasn’t been updated (not changed) within a given period. This then allows me to trigger an alarm.
Can someone suggest a method I could use to see if state has been updated in HA?
so you say appdaemon gets the value and updates it on HA?
then why look at HA for the last update
in the app that updates the sensor from HA create a last updated variable in the initialize
use a run_every (5 minutes) to check if the variable has a time longer then 5 minutes ago
if so send a notify.
And thanks for the fast response.
Yes correct, appdaemon updates HA
Hmm…okay need to think about that one.
“in the app that updates the sensor from HA create a last updated variable in the initialize”
little snippet of code would be handy here…
Not sure what gets returned, bu do you think get_state could also do the trick?