Switch status in time script
Posted: Saturday 17 September 2022 10:29
Hello, I am a newbe in lua. I have a time script in which I want to ask the status of a dummy-switch.
As a test I tried:
if (otherdevices('Alarm_Aan_Uit') == 'On') then
print('Aan')
else
print('Uit')
end
In the log I find:
2022-09-17 10:28:00.488 Error: EventSystem: in /home/pi/domoticz/scripts/lua/script_time_PIRs.lua: /home/pi/domoticz/scripts/lua/script_time_PIRs.lua:37: attempt to call a table value (global 'otherdevices')
What is my error?
As a test I tried:
if (otherdevices('Alarm_Aan_Uit') == 'On') then
print('Aan')
else
print('Uit')
end
In the log I find:
2022-09-17 10:28:00.488 Error: EventSystem: in /home/pi/domoticz/scripts/lua/script_time_PIRs.lua: /home/pi/domoticz/scripts/lua/script_time_PIRs.lua:37: attempt to call a table value (global 'otherdevices')
What is my error?