Hi there, I have the following code. Using the Phue Bridge 2.0 and richer lights Philips Hue set.
from phue import Bridge
b = Bridge('192.168.1.75')
If the app is not registered and the button is not pressed, press the button and call connect() (this only needs to be run a single time)
b.connect()
Get the bridge state (This returns the full dictionary that you can explore)
b.get_api()
Prints if light 3 is on or not
b.get_light(3, 'on')
i get the following error.
File "C:/Users/joel/Desktop/philipshue/test1.py", line 20, in
b.get_light(3, 1)
File "C:\Python27\lib\site-packages\phue.py", line 855, in get_light
return state['state'][parameter]
TypeError: list indices must be integers, not str
Hi there, I have the following code. Using the Phue Bridge 2.0 and richer lights Philips Hue set.
from phue import Bridge
b = Bridge('192.168.1.75')
If the app is not registered and the button is not pressed, press the button and call connect() (this only needs to be run a single time)
b.connect()
Get the bridge state (This returns the full dictionary that you can explore)
b.get_api()
Prints if light 3 is on or not
b.get_light(3, 'on')
i get the following error.
File "C:/Users/joel/Desktop/philipshue/test1.py", line 20, in
b.get_light(3, 1)
File "C:\Python27\lib\site-packages\phue.py", line 855, in get_light
return state['state'][parameter]
TypeError: list indices must be integers, not str