nikshriv / cync_lights

Home Assistant Integration for controlling Cync switches, plugs, and bulbs
161 stars 53 forks source link

Error when running parse_cync_data.py file #103

Open herm95 opened 1 month ago

herm95 commented 1 month ago

Hello! Recently came across this repo to setup an integration in Home Assistant. When signing in I get the following error:

Invalid or unsupported Cync configuration, please ensure there is at least one WiFi connected Cync device in your Home(s)

Seeing that my devices do meet the requirements for this integration to work (connected to wifi, has a neutral wire, etc.), I ran the _cyncdata.py file to retrieve my configurations. And after running the _parse_cyncdata.py file, I receive this error:

`line 102, in output = json.dumps(main(data),indent = 2) ^^^^^^^^^^ line 69, in main available_room_controllers = [(id%1000) + (int(id/1000)256) for id in room.get('deviceIDArray',[]) if 'switch_controller' in devices[home_devices[home_id][(id%1000)+(int(id/1000)256)]]]


KeyError: ''"`

The _KeyError_ log is seen in my homeassistant logs but the rest is not. It seems this is the culprit for my devices not connecting? Looking for any help on understanding this issue!