Tried this but that doesn't work:
Code: Select all
local Version = '17.11.23'
return {
active = true,
on = {
timer = {'Every 1 minutes'}
},
logging = {marker = 'CHECK LIGHT FOR 15MIN ' ..Version},
execute = function(domoticz, device)
if
domoticz.devices(18).state == 'On' and domoticz.devices(18).lastUpdate.minutesAgo > 1 -- Bathroom sink
then
domoticz.log('--------------------==<[ Check light: Batchroom sink lights are on ]>==--------------------', domoticz.LOG_FORCE)
os.execute('/home/pi/domoticz/scripts/Peter/speech.sh Bathroom sink lights are on')
end
end
}Can someone help me?