Can not run constructor of Light() when device is is programming mode. The issue is more relevant, because it was normal for me to run device in this mode, reason beeing it is new for this app. By programming mode I mean mode when you connect and reconnect power supply 3 times, and device flashes every color separatly.
To Reproduce
import magichue
bulbs = magichue.discover_bulbs() # returns list of bulb address
print(bulbs[0])
light = magichue.Light(bulbs[0])
Device
Magic home RGBW light script with new chip (not ESP8266)
Additional context
The reason for this problem is that 'programming mode' (you enter it by reconnecting power supply 3 times) has its own of mode_value = 0x63, wich is not in dictionary, so on call
self.mode = modes._VALUE_TO_MODE[mode_value]
python rises KeyError: 99.
The fix for me was to add this mode to const and dictionary to modes.py, i.e. :
Can not run constructor of Light() when device is is programming mode. The issue is more relevant, because it was normal for me to run device in this mode, reason beeing it is new for this app. By programming mode I mean mode when you connect and reconnect power supply 3 times, and device flashes every color separatly.
To Reproduce
Device
Additional context The reason for this problem is that 'programming mode' (you enter it by reconnecting power supply 3 times) has its own of mode_value = 0x63, wich is not in dictionary, so on call
python rises KeyError: 99. The fix for me was to add this mode to const and dictionary to modes.py, i.e. :
There are 3 palceses where you need to it, this is only suggestion for fix