Hi
I have a 3in1 sensor (EZmotion) that is not always updating all the child sensors every wake up (either by design or other factors) but either way - its becuase of this that i cannot use the parent device’s ‘Last Update’ value, as it is no guarantee that was when the child sensors were last updated.
So to help with this, i would thinking about having a piece of code to constantly look out for any updates (even if the update value is the same) to a particular variable on a child device and then when it occurs it just adds the current OS.time to a new variable field ‘LastUpdate’ on that child device as one does not exist currently ?
Here is my thinking so far, and I would appreciate some help on the logic needed in the middle
[code]local Light_ID = 120
local HA_SERV = “urn:micasaverde-com:serviceId:HaDevice1”
local LIGHT_SERV = “urn:micasaverde-com:serviceId:LightSensor1”
– what would go in here to check the logs for any update ?–
luup.variable_set(HA_SERV, “LastUpdate”, os.time(), Light_ID)
[/code]
Many thanks for looking…