If I have a second "home" with zero devices, I get an error when trying to input my credentials in the HA integration after installation. After deleting the empty home, the error goes away.
Logger: custom_components.cync_lights.config_flow
Source: custom_components/cync_lights/cync_hub.py:658
Integration: cync_lights (documentation)
First occurred: 3:46:49 PM (4 occurrences)
Last logged: 4:18:36 PM
Unexpected exception
Traceback (most recent call last):
File "/config/custom_components/cync_lights/config_flow.py", line 101, in async_step_two_factor_code
info["data"]["cync_config"] = await self.cync_hub.get_cync_config()
File "/config/custom_components/cync_lights/cync_hub.py", line 658, in get_cync_config
bulbs_array_length = max([((device['deviceID'] % home['id']) % 1000) + (int((device['deviceID'] % home['id']) / 1000)*256) for device in home_info['bulbsArray']]) + 1
ValueError: max() arg is an empty sequence
If I have a second "home" with zero devices, I get an error when trying to input my credentials in the HA integration after installation. After deleting the empty home, the error goes away.
Logger: custom_components.cync_lights.config_flow Source: custom_components/cync_lights/cync_hub.py:658 Integration: cync_lights (documentation) First occurred: 3:46:49 PM (4 occurrences) Last logged: 4:18:36 PM
Unexpected exception Traceback (most recent call last): File "/config/custom_components/cync_lights/config_flow.py", line 101, in async_step_two_factor_code info["data"]["cync_config"] = await self.cync_hub.get_cync_config() File "/config/custom_components/cync_lights/cync_hub.py", line 658, in get_cync_config bulbs_array_length = max([((device['deviceID'] % home['id']) % 1000) + (int((device['deviceID'] % home['id']) / 1000)*256) for device in home_info['bulbsArray']]) + 1 ValueError: max() arg is an empty sequence