Closed jpringle1 closed 4 years ago
Can you try b.get_light(1) and see what the output is ?
-- lecaude.com studioimaginaire.com
Le 25 déc. 2019 à 06:11, jpringle1 notifications@github.com a écrit :
b.get_light(1, 'on')
Can you try b.get_light(1) and see what the output is ? … -- lecaude.com studioimaginaire.com Le 25 déc. 2019 à 06:11, jpringle1 @.***> a écrit : b.get_light(1, 'on')
I get a different error message, but i'm still just as lost.
[{'error': {'type': 3, 'address': '/lights/1', 'description': 'resource, /lights/1, not available'}}]
Seems like there is no light associated with id 1. Try b.get_api() to see a list of lights with their ids.
-- lecaude.com studioimaginaire.com
Le 27 déc. 2019 à 11:43, jpringle1 notifications@github.com a écrit :
Can you try b.get_light(1) and see what the output is ? … -- lecaude.com studioimaginaire.com Le 25 déc. 2019 à 06:11, jpringle1 @.***> a écrit : b.get_light(1, 'on')
I get a different error message, but i'm still just as lost. [{'error': {'type': 3, 'address': '/lights/1', 'description': 'resource, /lights/1, not available'}}]
— You are receiving this because you commented. Reply to this email directly, view it on GitHub, or unsubscribe.
Seems like there is no light associated with id 1. Try b.get_api() to see a list of lights with their ids.
This worked, thank you! For some reason my lights only start at 4.
Following the guide in the README, when i type this:
from phue import Bridge
b = Bridge('192.168.0.3')
b.connect()
b.get_light(1, 'on')
I get this error:
Traceback (most recent call last):
File "<stdin>", line 1, in <module>
return state['state'][parameter]
TypeError: list indices must be integers, not str
What am i doing wrong? Might i have installed python or phue incorrectly? (I'm running linux).