-
Notifications
You must be signed in to change notification settings - Fork 18
Open
Labels
bugSomething isn't workingSomething isn't working
Description
Describe the bug
When calling toggle_power on API 4.0.0 Firmware on PN POL 75C I get the following error.
Traceback (most recent call last):
File "/home/rcboykin/git/nanoleafapi/nanoleaf-cli.py", line 60, in <module>
nl.toggle_power()
~~~~~~~~~~~~~~~^^
File "/home/rcboykin/git/nanoleafapi/nanoleafapi/nanoleaf.py", line 224, in toggle_power
if self.get_power():
~~~~~~~~~~~~~~^^
File "/home/rcboykin/git/nanoleafapi/nanoleafapi/nanoleaf.py", line 220, in get_power
return ans['value']
~~~^^^^^^^^^
KeyError: 'value'
To Reproduce
Steps to reproduce the behavior:
- Call toggle_power()
- See error
Expected behavior
Power should toggle
Screenshots
N/A
Development environment (please complete the following information):
- OS: Fedora 42
- Python version: Python 3.13.7
- Nanoleaf device POL 75C Permanent Outdoor Lights
Additional context
The value of answer is {'on': {'value': True}} it seems the code expects {'value': True}.
Reactions are currently unavailable
Metadata
Metadata
Assignees
Labels
bugSomething isn't workingSomething isn't working