Has anyone found away in Luup code to load the table of Hue Scenes and associated data into an array?
And then access a Scene id from that array within an expression - ideally with a lookup, but if not that then an index value.
Currently in Reactor I set Hue lights using “RunHueScene” where I get the Scene id in an expression such as
Scene_selected = choose(Scene_number,“uSN5YpUD4YYYNAz”,“Mi7y6Z2oar6I283”,“pa3KVHJ3BZkJ9WY”,“DTjDQ80T-3WS-lF”,“uUXoVRO9Vc70xC8”,“uSN5YpUD4YYYNAz”)
where Scene_number is an index value - in this case from 1-5
But it would be much more elegant if I did not have to hard-code the Scene id into the expression but rather read it from an array. Don’t mind loading that on Vera boot-up if necessary.
Anyone any thoughts on this question?