dimto problems
Posted: Monday 04 September 2017 20:44
sure it's my mistake, please someone point it out to me.
I have the following script
When I try it I get this error
The Devices should be ok.
I have the following script
Code: Select all
return {
active = true,
on = {
devices = {
'Lägenhet scene ett'
}
},
execute = function(domoticz)
local Lagenhet_badrum_spegel = domoticz.devices(41) ----- Lägenhet badrum spegel
local Lagenhet_bord = domoticz.devices(57) ----- Lägenhet bord
local Lagenhet_scene1 = domoticz.devices(69) ----- Lägenhet scene ett
local Lagenhet_scene2 = domoticz.devices(70) ----- Lägenhet scene två
local Lagenhet_spot_bord = domoticz.devices(39) ----- Lägenhet spot bord
local Lagenhet_spot_horn = domoticz.devices(213) ----- Lägenhet spot hörn
local Lagenhet_spot_center = domoticz.devices(38) ----- Lägenhet spot center
if (Lagenhet_scene1.state == 'On' and (Lagenhet_spot_center.state ~= 'Off' or Lagenhet_spot_bord.state ~= 'Off' or Lagenhet_spot_horn.state ~= 'Off')) then
Lagenhet_scene1.switchOff()
Lagenhet_spot_horn.switchOff()
Lagenhet_spot_bord.switchOff()
Lagenhet_spot_center.switchOff()
Lagenhet_scene2.switchOff()
end
if (Lagenhet_scene1.state == 'On' and Lagenhet_spot_center.state == 'Off' and Lagenhet_spot_bord.state == 'Off' and Lagenhet_spot_horn.state == 'Off') then
Lagenhet_scene1.switchOff()
Lagenhet_spot_horn.dimto(70)
Lagenhet_spot_bord.dimto(60)
Lagenhet_spot_center.dimto(30)
Lagenhet_scene2.switchOff()
end
end
}Code: Select all
2017-09-04 20:37:33.307 Error: dzVents: Error: ...86)\Domoticz\scripts\dzVents\generated_scripts/Ellie.lua:27: attempt to call field 'dimto' (a nil value)