lastUpdate from triggered device is now (0 seconds ago)
Posted: Tuesday 22 September 2020 22:01
I'm running some dzVents scripts that use the 'lastUpdate' from the triggeredDevice. For some months the lastUpdate is the current time (or 1-2 sec old) while expect it to be the time it was updated before this script was called. I can't figure out what's wrong.
When I call the device using domoticz.devices('name').lastUpdate I get the same result. When calling another device, that is not triggered on that time, the lastUpdate is the time it was lastUpdated.
Relevant log:
Edit: Domoticz Version: 2020.2, dzVents Version: 3.0.2
When I call the device using domoticz.devices('name').lastUpdate I get the same result. When calling another device, that is not triggered on that time, the lastUpdate is the time it was lastUpdated.
Code: Select all
return {
on = {
devices = {
'Motion *',
'MC *'
}
},
execute = function(domoticz, device)
local lastTime = device.lastUpdate.minutesAgo; -- 0
Code: Select all
Status: dzVents: Info: Handling events for: "MC bergkamer", value: "Open"
Status: dzVents: Info: ------ Start internal script: PIR notification when no phone: Device: "MC bergkamer (Zigbee2MQTT)", Index: 106
Status: dzVents: Info: ------ Finished PIR notification when no phone
Status: dzVents: Info: ------ Start internal script: Bergkamer: Device: "MC bergkamer (Zigbee2MQTT)", Index: 106
Status: dzVents: Info: ------ Finished Bergkamer