Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Door sensor open/close state not hidden when hiding Homekit events #102

Open
garysargentpersonal opened this issue Nov 10, 2022 · 5 comments

Comments

@garysargentpersonal
Copy link

The LW931 door sensor open/close state is provided by Homekit, so I'd expect this sensor to be hidden when hiding things provided by Homekit (leaving just the battery diagnostic).

@garysargentpersonal
Copy link
Author

This sensor is still shown even in the latest beta (3.5.17beta2).

I'm also now getting an error log at startup:

Logger: homeassistant.components.binary_sensor
Source: custom_components/lightwave2/binary_sensor.py:80
Integration: Binary Sensor (documentation, issues)
First occurred: 14:30:27 (2 occurrences)
Last logged: 14:30:27

Error adding entities for domain binary_sensor with platform lightwave2
Error while setting up lightwave2 platform for binary_sensor
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 692, in _async_add_entity
    await entity.add_to_platform_finish()
  File "/usr/src/homeassistant/homeassistant/helpers/entity.py", line 788, in add_to_platform_finish
    await self.async_added_to_hass()
  File "/config/custom_components/lightwave2/binary_sensor.py", line 80, in async_added_to_hass
    registry = er.async_get(self._hass)
AttributeError: 'LWRF2BinarySensor' object has no attribute '_hass'

Unrelated but I noticed this when deleting and re-adding the integration to check if that helped... when you add the integration you aren't presented with the config screen in the wizard, so have no opportunity to select "ignore homekit" or "use public api" when you setup the integration. Feels like you should get that choice when initially setting things up, not after.

@bigbadblunt
Copy link
Owner

Thanks, just pushed a new beta for you to test.

Agreed on the config options, will try to work out how that can be implemented.

@bigbadblunt
Copy link
Owner

Is this fixed now?

@garysargentpersonal
Copy link
Author

The entity is still there, but is marked as "hidden" in its settings, which just hides it from the default dashboard.

The error mentioned above is also still appearing.

@bigbadblunt
Copy link
Owner

Literally the same error? Can you post a full log please?

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants