Noticed tonight that the Bridge.load_scene function was working, complaining with the error message:
Traceback (most recent call last):
File "/Users/noah/code/viki/app/hue/hue.py", line 35, in <module>
h.load_scene('Relax')
File "/Users/noah/code/viki/app/hue/hue.py", line 17, in load_scene
self.bridge.run_scene('Noah Bedroom', scene_name)
File "/Users/noah/code/viki/venv/lib/python3.7/site-packages/phue.py", line 1166, in run_scene
scenes = [x for x in self.scenes if x.name == scene_name]
File "/Users/noah/code/viki/venv/lib/python3.7/site-packages/phue.py", line 1138, in scenes
return [Scene(k, **v) for k, v in self.get_scene().items()]
File "/Users/noah/code/viki/venv/lib/python3.7/site-packages/phue.py", line 1138, in <listcomp>
return [Scene(k, **v) for k, v in self.get_scene().items()]
TypeError: __init__() got an unexpected keyword argument 'type'
When I tested on the Hue API debugging tool at /api/<username>/scenes, I got responses such as
The type and group properties must have been causing the error. My fix just adds the two new properties, and adds *args and *kwargs to catch any future unexpected property additions.
Passes unit tests, though there didn't seem to be any tests that specifically tested this function.
Tested manually with the following software versions:
Bridge: Version 1810251352
Lights: Version 1.29.0_r21169
Noticed tonight that the
Bridge.load_scene
function was working, complaining with the error message:When I tested on the Hue API debugging tool at
/api/<username>/scenes
, I got responses such asThe
type
andgroup
properties must have been causing the error. My fix just adds the two new properties, and adds*args
and*kwargs
to catch any future unexpected property additions.Passes unit tests, though there didn't seem to be any tests that specifically tested this function.
Tested manually with the following software versions: Bridge: Version 1810251352 Lights: Version 1.29.0_r21169