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

Log error: "error while setting up sureha platform for sensor" #204

Open
ChristophCaina opened this issue Dec 28, 2023 · 0 comments
Open

Comments

@ChristophCaina
Copy link

As mentioned in benleb/sureha#44
I am getting the following error in my logs, which is also showing a reference to SurePy:

Logger: homeassistant.components.sensor
Source: helpers/entity_platform.py:360
Integration: Sensor (documentation, issues)
First occurred: 5:01:34 PM (1 occurrences)
Last logged: 5:01:34 PM

Error while setting up sureha platform for sensor
Traceback (most recent call last):
  File "/usr/src/homeassistant/homeassistant/helpers/entity_platform.py", line 360, in _async_setup_platform
    await asyncio.shield(task)
  File "/config/custom_components/sureha/sensor.py", line 64, in async_setup_entry
    entities.append(Flap(spc.coordinator, surepy_entity.id, spc))
                    ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
  File "/config/custom_components/sureha/sensor.py", line 184, in __init__
    self._attr_entity_picture = self._surepy_entity.icon
                                ^^^^^^^^^^^^^^^^^^^^^^^^
  File "/usr/local/lib/python3.11/site-packages/surepy/entities/devices.py", line 247, in icon
    if self.state == LockState.LOCKED_ALL:
       ^^^^^^^^^^
  File "/usr/local/lib/python3.11/site-packages/surepy/entities/devices.py", line 235, in state
    return LockState(self._data["status"]["locking"]["mode"])
                     ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~^^^^^^^^
KeyError: 'mode'
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

1 participant