Skip to content

Somfy cover entity is unavailable #4

@AsyncLegs

Description

@AsyncLegs

Hello!
Thanks for your awesome integration. I'm looking forward to using it in my HA setup. I've installed it from HACS using a custom repository, as pointed to in the docs.

My Somfy device seems to have been added - the cover entity appeared but is in an unavailable state.

Unfortunately, I got this error in the Home Assistant logs:

Could you please help with further debugging 😇?

Hass versions
Core 2025.2.4
Supervisor 2025.02.1
Operating System 14.2

Error adding entity cover.rfy_000001_1 for domain cover with platform rfxtrx
Traceback (most recent call last):
  File "/usr/src/homeassistant/homeassistant/helpers/entity_platform.py", line 609, in _async_add_entities
    await coro
  File "/usr/src/homeassistant/homeassistant/helpers/entity_platform.py", line 928, in _async_add_entity
    await entity.add_to_platform_finish()
  File "/usr/src/homeassistant/homeassistant/helpers/entity.py", line 1383, in add_to_platform_finish
    await self.async_added_to_hass()
  File "/config/custom_components/rfxtrx/ext/somfy_roller_blind.py", line 99, in async_added_to_hass
    old_pos = old_state.attributes['current_position']
              ~~~~~~~~~~~~~~~~~~~~^^^^^^^^^^^^^^^^^^^^
KeyError: 'current_position'

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions