When i press a button on my remote control i want to update a selector switch in Domoticz.
To update the selector switch i use a LUA script, only this script won't run, in my devices tab i see that when i press a button on the remote control that Itho_actuele_stand is updated, what do i wrong?
Code: Select all
commandArray = {}
if (devicechanged['Itho_actuele_stand'] == '1.00' and otherdevices['Ihto Ventilatie'] ~= 'Low') then
commandArray['UpdateDevice'] = '290|10|10'
elseif (devicechanged['Itho_actuele_stand'] == '2.00' and otherdevices['Ihto Ventilatie'] ~= 'Medium') then
commandArray['UpdateDevice'] = '290|20|20'
elseif (devicechanged['Itho_actuele_stand'] == '3.00' and otherdevices['Ihto Ventilatie'] ~= 'High') then
commandArray['UpdateDevice'] = '290|30|30'
elseif (devicechanged['Itho_actuele_stand'] == '13.00' and otherdevices['Ihto Ventilatie'] ~= 'Timer1') then
commandArray['UpdateDevice'] = '290|40|40'
elseif (devicechanged['Itho_actuele_stand'] == '23.00' and otherdevices['Ihto Ventilatie'] ~= 'Timer2') then
commandArray['UpdateDevice'] = '290|50|50'
elseif (devicechanged['Itho_actuele_stand'] == '33.00' and otherdevices['Ihto Ventilatie'] ~= 'Timer3') then
commandArray['UpdateDevice'] = '290|60|60'
end
return commandArray