studioimaginaire / phue

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

run_scene() gets unexpected keyword argument 'group' #145

Closed AwesomeIndustry closed 5 years ago

AwesomeIndustry commented 5 years ago

Hi, I've been trying to set a scene with bridge.run_scene(room_name,scene_name), but I get this error:

Traceback (most recent call last):
  File "<pyshell#14>", line 1, in <module>
    bridge.run_scene("Entertainment Area 1","Savanna Sunset")
  File "/home/pi/.local/lib/python2.7/site-packages/phue.py", line 1166, in run_scene
    scenes = [x for x in self.scenes if x.name == scene_name]
  File "/home/pi/.local/lib/python2.7/site-packages/phue.py", line 1138, in scenes
    return [Scene(k, **v) for k, v in self.get_scene().items()]
TypeError: __init__() got an unexpected keyword argument 'group'

Am I doing something wrong?

(P.S: It appears that bridge.scenes no longer exists? Is there a better alternative than using b.get_api()["scenes"]?)

Cazfri commented 5 years ago

This is the same issue at #144. I think Philips must have updated their API and the scene code is written in such a way that it can't handle any more properties than exactly expected. I submitted a PR (https://github.com/studioimaginaire/phue/pull/143) with a fix, you can just copy or fork that for now if you like.

natcl commented 5 years ago

Pull request merged! Thanks!

-- lecaude.com studioimaginaire.com

Le 24 nov. 2018 à 10:30, Noah Martin-Ruben notifications@github.com a écrit :

I think Philips must have updated their API and the scene code is written in such a way that it can't handle any more properties than exactly expected. I submitted #143 with a fix, you can just copy or fork that for now if you like.

— You are receiving this because you are subscribed to this thread. Reply to this email directly, view it on GitHub, or mute the thread.

richtems commented 5 years ago

Can you please release a new version on PyPI? Would love that!