Code: Select all
commandArray = {}
if (devicechanged['Hue dimmer switch 2 Button Up'] == 'On') then
brightness = 80
iswhite = "false"
hue = "0" -- red
idx = otherdevices_idx["Bol Lamp"] -- name lamp
url = 'http://10.0.0.1:8090/json.htm?type=command¶m=setcolbrightnessvalue&idx=' .. idx .. '&hue=' .. hue .. '&brightness=' .. brightness ..'&iswhite=' .. iswhite
commandArray['OpenURL']= url
end
return commandArray
Also, I noticed that after upgrade to v3.5877, the state of a Hue device that was set up this way, is now reported as On, whereas previously it was Set Level. At the same time, if I set it up using the color slider dialog, the status is again set to Set Level, which is a bit inconsistent and complicates its handling in scripts. Was it a deliberate change or is it a glitch?