studioimaginaire / phue

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

Problem with Bridge.get_light() #168

Closed belfed closed 4 years ago

belfed commented 4 years ago

Hello, I have just started with phue and I'm facing a little problem with the method get_light(). The code I'm trying to run is one of the examples within the git repo, tk_gui_simple.py.

When I compile the file I get this error:

Exception has occurred: TypeError
**list indices must be integers or slices, not str**
  File "C:\Users\Federico\testLights.py", line 29, in <module>
    **scale.set(b.get_light(1,'bri'))**

I checked the documentation and the method signature is correct (also because it is an official example). What could the problem be?

Thank you in advance for the help.

belfed commented 4 years ago

I'm sorry, I found out there was a mistake with the lights indexes. I don't know why they started from 2 and not from 1.

natcl commented 4 years ago

That can happen when a light was removed from the bridge.

-- lecaude.com studioimaginaire.com

Le 3 avr. 2020 à 18:57, Federico Belotti notifications@github.com a écrit :

 Closed #168.

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