Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- commandArray = {}
- local light_intensity = 'LUX-meter'
- local isdark_switch = 'SchemerschakelaarBuiten'
- local lux_lower = 80
- local lux_upper = 250
- if (devicechanged[light_intensity]) then
- lux = tonumber(otherdevices_svalues[light_intensity])
- if lux <= tonumber(lux_lower) and otherdevices[isdark_switch] == 'Off' then
- commandArray[isdark_switch] = 'On'
- print('<font color="blue">isdonker is ingeschakeld!!</font>')
- elseif lux >= tonumber(lux_upper) and otherdevices[isdark_switch] == 'On' then
- commandArray[isdark_switch] = 'Off'
- print('<font color="blue">isdonker is uitgeschakeld!!</font>')
- end
- end
- return commandArray
Add Comment
Please, Sign In to add comment