Again is taking an example from the video not working. 16:56
The difference's is the name of the device in the way that I have a space in that name.
Also I have skipped the log part.
Code: Select all
return {
on = {
devices = {
'Lichtsensor Binnen'
},
},
execute = function(domoticz, 'Lichtsensor Binnen') <-- error
if ('Lichtsensor Binnen'.state == 'On') then
local KSR = domoticz.devices('Kamer Schoorsteen Rechts')
KSR.switchOn()
end
end
}
2019-10-07 17:40:17.900 Status: dzVents: Write file: C:\Program Files (x86)\Domoticz\scripts\dzVents\generated_scripts\4 mei.lua
2019-10-07 17:40:17.901 Status: dzVents: Write file: C:\Program Files (x86)\Domoticz\scripts\dzVents\generated_scripts\Lichtsensor binnen.lua
2019-10-07 17:40:49.416 Status: dzVents: Error (2.4.19): error loading module 'Lichtsensor binnen' from file 'C:\Program Files (x86)\Domoticz\scripts\dzVents\generated_scripts/Lichtsensor binnen.lua':
2019-10-07 17:40:49.416 ...scripts\dzVents\generated_scripts/Lichtsensor binnen.lua:7: <name> or '...' expected near ''Lichtsensor Binnen''
(BTW why is also write my 4 mei.lua script every time.)
This make me not looking smart. :')