studioimaginaire / phue

A Python library for the Philips Hue system
Other
1.52k stars 267 forks source link

set_light fails to do proper arg canonicalization for 'name' parameter #117

Open ticalc-travis opened 6 years ago

ticalc-travis commented 6 years ago

If Bridge.set_light() gets a light name as a string, it normally converts it to a light ID, and it converts the parameter, value pair into a dict if it isn't already. This works for state parameters, but the code path that tests for 'name' uses the var names of the unconverted arguments instead of the converted ones, so it fails if the passed light_id argument is a str or if parameter is a dict.

I might be able to submit a pull request to fix this if I get some time, but if someone beats me to it, that would be fine, too. :-)