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 Errors after installation on 2024.1.b0b #44

Closed
ChristophCaina opened this issue Dec 28, 2023 · 1 comment
Closed

Log Errors after installation on 2024.1.b0b #44

ChristophCaina opened this issue Dec 28, 2023 · 1 comment

Comments

@ChristophCaina
Copy link
Contributor

ChristophCaina commented Dec 28, 2023

I've installed the Integration today.
All devices (Hub, Flap, cats) are available - and are showing some sensors, but in the logs, I am getting the following errors:

Logger: homeassistant.components.sensor
Source: helpers/entity_platform.py:360
Integration: Sensor ([documentation](https://rc.home-assistant.io/integrations/sensor), [issues](https://github.com/home-assistant/core/issues?q=is%3Aissue+is%3Aopen+label%3A%22integration%3A+sensor%22))
First occurred: 1:19:06 PM (1 occurrences)
Last logged: 1:19:06 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 59, in async_setup_entry
    entities.append(Flap(spc.coordinator, surepy_entity.id, spc))
                    ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
  File "/config/custom_components/sureha/sensor.py", line 179, 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'

Also, it seems that there are some constants that require changes (using HA 2024.1.0b0 (beta))

Logger: homeassistant.const
Source: helpers/deprecation.py:204
First occurred: 1:18:55 PM (14 occurrences)
Last logged: 1:19:06 PM

DEVICE_CLASS_BATTERY was used from sureha, this is a deprecated constant which will be removed in HA Core 2025.1. Use SensorDeviceClass.BATTERY instead, please create a bug report at https://github.com/benleb/sureha/issues
MASS_GRAMS was used from sureha, this is a deprecated constant which will be removed in HA Core 2025.1. Use UnitOfMass.GRAMS instead, please create a bug report at https://github.com/benleb/sureha/issues
VOLUME_MILLILITERS was used from sureha, this is a deprecated constant which will be removed in HA Core 2025.1. Use UnitOfVolume.MILLILITERS instead, please create a bug report at https://github.com/benleb/sureha/issues
DEVICE_CLASS_CONNECTIVITY was used from sureha, this is a deprecated constant which will be removed in HA Core 2025.1. Use BinarySensorDeviceClass.CONNECTIVITY instead, please create a bug report at https://github.com/benleb/sureha/issues
DEVICE_CLASS_PRESENCE was used from sureha, this is a deprecated constant which will be removed in HA Core 2025.1. Use BinarySensorDeviceClass.PRESENCE instead, please create a bug report at https://github.com/benleb/sureha/issues
ChristophCaina added a commit to ChristophCaina/sureha that referenced this issue Dec 28, 2023
fix issue with depricated constants (partially fix for benleb#44)
ChristophCaina added a commit to ChristophCaina/sureha that referenced this issue Dec 28, 2023
Partially fix for benleb#44 -> BinarySensorDeviceClass
@ChristophCaina
Copy link
Contributor Author

should be fixed with #59

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