lastUpdate object
Posted: Thursday 26 December 2019 16:52
Hi everyone,
I am struggling with the lastUpdate object of dzVents. I often use it in combination with the minutesAgo() function in my scripts, but now I want to use the time itself, rather than the comparison to the current time, which I want to show in the log (I want to show the time that my door sensor was triggered in the log, but the script itself is not triggered by the door sensor so I can't use the current time of the system as a proxy).
When I want to ouput dz.device("door").lastUpdate to the log, it gives me an error. Can anyone help me with the correct method to show the time a device was last triggered in the log?
Many thanks and happy holidays
I am struggling with the lastUpdate object of dzVents. I often use it in combination with the minutesAgo() function in my scripts, but now I want to use the time itself, rather than the comparison to the current time, which I want to show in the log (I want to show the time that my door sensor was triggered in the log, but the script itself is not triggered by the door sensor so I can't use the current time of the system as a proxy).
When I want to ouput dz.device("door").lastUpdate to the log, it gives me an error. Can anyone help me with the correct method to show the time a device was last triggered in the log?
Many thanks and happy holidays