Open CD-UNCC opened 4 years ago
Out of curiosity, what's you use case for this?
Out of curiosity, what's you use case for this?
Great question, I was thinking the same. You can already identify by name, and index number once the system is established. I'm new here, but I want to keep adding to this library or fork, but I'm still discovering how to do it all.
Just trying to send bridge.lights back to a front end application as a json object. At least I think... sorry its been so long
Ah okay. Well, one thing I wrote for myself to handle lights was to make a For Loop and iterate through them. You could do that and add the key "name", "ID or Light Index" to a dictionary to pass to your front end as JSON.
I think my method used "hue_system"
for light, index in hue_system.get_lights():
Not sure if you've tried that already or if it's more difficult than that, but this among other simple things is something I want to contribute because it's not very easy to just get all color lights or get all white lights, sensors, and in a format that can be used such as in your case.
Have we thought about making classes serializable? One cannot json.dumps bridge.lights