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