Yesterday, 07:33
Hello all.
I get feedback from a pharos lightning controller (from 0 to lets say 100) and want to convvert it to status object in knx.
The code below is working fine but I have some status that should be True if "status" = 31, if "status" is betwen 41-45 nothing shall happen and if "status" is any other number status should be False.
How to do that?
I get feedback from a pharos lightning controller (from 0 to lets say 100) and want to convvert it to status object in knx.
The code below is working fine but I have some status that should be True if "status" = 31, if "status" is betwen 41-45 nothing shall happen and if "status" is any other number status should be False.
How to do that?
Code:
status = event.getvalue()
if (status == 17 ) then
grp.checkwrite('STATUS_SCEN1', true)
else
grp.checkwrite('STATUS_SCEN1', false)
end
if (status == 18 ) then
grp.checkwrite('STATUS_SCEN2', true)
else
grp.checkwrite('STATUS_SCEN2', false)
end
if (status == 19 ) then
grp.checkwrite('STATUS_SCEN3', true)
else
grp.checkwrite('STATUS_SCEN3', false)
end