nikshriv / cync_lights

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

Bug pulling light entities from Cync #30

Closed ryanwaldron closed 1 year ago

ryanwaldron commented 1 year ago

Simple setup of 6 white bulbs in Cync.

Home Assistant 2022.11.5 Supervisor 2022.11.2 Operating System 9.3 Frontend 20221108.0 - latest

Freshly added integration via HACS, Freshly installed HA

Logger: homeassistant.components.light Source: custom_components/cync_lights/light.py:163 Integration: Light (documentation, issues) First occurred: 11:56:47 AM (2 occurrences) Last logged: 11:56:47 AM

Error adding entities for domain light with platform cync_lights Error while setting up cync_lights platform for light Traceback (most recent call last): File "/usr/src/homeassistant/homeassistant/helpers/entity_platform.py", line 428, in async_add_entities await asyncio.gather(*tasks) File "/usr/src/homeassistant/homeassistant/helpers/entity_platform.py", line 529, in _async_add_entity device_info = entity.device_info File "/config/custom_components/cync_lights/light.py", line 163, in device_info identifiers = {(DOMAIN, f"{self.cync_switch.room.name} ({self.cync_switch.home_name})")}, AttributeError: 'NoneType' object has no attribute 'name'

huineng commented 1 year ago

i have exactly the same error Home Assistant 2022.12.0 Frontend 20221207.0 - latest in docker

nikshriv commented 1 year ago

I'm guessing you might have an empty "home" in your Cync configuration. If so, delete it and you should be able to install. Without your configuration data, I can't really tell you what's wrong. You will need to run my cync_data.py script, redact sensitive info and then post here.

huineng commented 1 year ago

this is what i see when i set it up, as you can see no rooms are being displayed where do i need to set up these rooms ? (i only have areas) thanks

image
bakedhorse commented 1 year ago

I'm guessing you might have an empty "home" in your Cync configuration. If so, delete it and you should be able to install. Without your configuration data, I can't really tell you what's wrong. You will need to run my cync_data.py script, redact sensitive info and then post here.

Suffering from the issue as well, same exact error messages in HA Logs. The integration "Shutdown:" after it fails to pull the light. I ran your 'cync_data.py' and retrieved this info, all sensitive info being redacted with 'xxxxxxxxxxxxx'.

cbyge_rooms.zip

nikshriv commented 1 year ago

I'm guessing you might have an empty "home" in your Cync configuration. If so, delete it and you should be able to install. Without your configuration data, I can't really tell you what's wrong. You will need to run my cync_data.py script, redact sensitive info and then post here.

Suffering from the issue as well, same exact error messages in HA Logs. The integration "Shutdown:" after it fails to pull the light. I ran your 'cync_data.py' and retrieved this info, all sensitive info being redacted with 'xxxxxxxxxxxxx'.

cbyge_rooms.zip

I looked through your configuration and it appears that the only Cync device you have in your home does not support WiFi and only uses bluetooth. At least one WiFi connected device is required for this integration to work. I made some modifications to the integration which I should be updating soon that will prevent users from getting through the installation if the configuration is not compatible.

nikshriv commented 1 year ago

Just updated the integration to fail installation if your system does not meet all requirements.