if not i surely hope something will be implemented to check which device triggered an event
another way to check which device triggered an event is to do a device.name==(' ddddd')
problem with this is if you have a long list of devices you will have to name them al to check
wildcards do not work with the check (while they do work with the device trigger list)
also you can only check if a device.name is the same.
would be nice to do a check if the device.name is NOT EQUAL
i am trying to figur out which device triggered the event but it seems that trigger.Info.trigger does not work with devices
return {
active = true,
on = {
Devices = {
'deviceA',
'deviceB'
}
},
execute = function(domoticz, devices, triggerInfo)
-- external light switch name
if (triggerInfo.trigger == 'deviceA') then
external_light.switchOn()
else
external_light.switchOff()
end
end
}