Engineer @ LinkedIn
nirantak / hue-api Goto Github PK
View Code? Open in Web Editor NEWAsync API for controlling Hue Lights
Home Page: https://hue-api.nirantak.com
License: MIT License
Async API for controlling Hue Lights
Home Page: https://hue-api.nirantak.com
License: MIT License
Hi Nirantak,
Thanks so much for such a well written library and for keeping it up to date.
I was wondering if you had any plans to add the rest of the available states to the set_state() Light method?
Your library is amazing, but only supports a small number of state changes. I'd love to allow for effects, alert and colormode.
Is this something you'd be interested in adding? If not, can you tell me what the best way to go about it is? Is it as simple as adding the required keys in the method on line 101?
Many thanks again for all the time you put into this (and for the type hints).
Thanks for this library !
I'm hooking my lights up to my StreamDeck +, and ran into this issue.
On initital get_state I end up with something like this ::
state = {"on": True, "bri": 228, "hue": 8378, "sat": 212, "effect": "none", "xy": [0.4976, 0.4266], "ct": 350, "alert": "select", "colormode": "hs", "mode": "homeautomation", "reachable": True}
I updated the "bri" value and set_state(state).
It set the full state as expected, but the light was kind of flashing and struggling with the info,
so I read a bit further and it looks like you can just update what you want as in , via asyncio: light.set_state({ "bri": 123 })
So I tried that, adn now the get_state call looks very different, even after a light.restore_state().
{"on": true, "bri": 213, "alert": "select", "mode": "homeautomation", "reachable": false
Everything else is gone.
Is that as expected?
Do I need to set a certain combination of parameters per mode?
I went through the developer docs and couldn't see anything on this.
Happy to send more data / run tests if it helps :)
A declarative, efficient, and flexible JavaScript library for building user interfaces.
๐ Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
An Open Source Machine Learning Framework for Everyone
The Web framework for perfectionists with deadlines.
A PHP framework for web artisans
Bring data to life with SVG, Canvas and HTML. ๐๐๐
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
Some thing interesting about web. New door for the world.
A server is a program made to process requests and deliver data to clients.
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
Some thing interesting about visualization, use data art
Some thing interesting about game, make everyone happy.
We are working to build community through open source technology. NB: members must have two-factor auth.
Open source projects and samples from Microsoft.
Google โค๏ธ Open Source for everyone.
Alibaba Open Source for everyone
Data-Driven Documents codes.
China tencent open source team.