Skip to content

Some errors in HA registry #45

@Dev-Fabry

Description

@Dev-Fabry

Hi
These are probably sensors that are not available on my system or do not work as the code would expect

Source: components/sensor/recorder.py:340

Entity sensor.xxxx_ev_charged from integration atonstorage has state class total_increasing, but its state is negative. Triggered by state -1.0 with last_updated set to 2025-03-01T20:39:59.999999+00:00. Please create a bug report at https://github.com/wilds/hass-atonstorage/issues

source: helpers/entity_platform.py:738

atonstorage: Error on device update!
Traceback (most recent call last):
File "/usr/src/homeassistant/homeassistant/helpers/entity_platform.py", line 738, in _async_add_entity
await entity.async_device_update(warning=False)
File "/usr/src/homeassistant/homeassistant/helpers/entity.py", line 1318, in async_device_update
await self.async_update()
File "/usr/src/homeassistant/homeassistant/helpers/update_coordinator.py", line 601, in async_update
await self.coordinator.async_request_refresh()
File "/usr/src/homeassistant/homeassistant/helpers/update_coordinator.py", line 275, in async_request_refresh
await self._debounced_refresh.async_call()
File "/usr/src/homeassistant/homeassistant/helpers/debounce.py", line 114, in async_call
await task
File "/usr/src/homeassistant/homeassistant/helpers/update_coordinator.py", line 356, in async_refresh
await self._async_refresh(log_failures=True)
File "/usr/src/homeassistant/homeassistant/helpers/update_coordinator.py", line 479, in _async_refresh
self.async_update_listeners()
~~~~~~~~~~~~~~~~~~~~~~~~~~~^^
File "/usr/src/homeassistant/homeassistant/helpers/update_coordinator.py", line 178, in async_update_listeners
update_callback()
~~~~~~~~~~~~~~~^^
File "/usr/src/homeassistant/homeassistant/helpers/update_coordinator.py", line 559, in _handle_coordinator_update
self.async_write_ha_state()
~~~~~~~~~~~~~~~~~~~~~~~~~^^
File "/usr/src/homeassistant/homeassistant/helpers/entity.py", line 1023, in async_write_ha_state
self._async_write_ha_state()
~~~~~~~~~~~~~~~~~~~~~~~~~~^^
File "/usr/src/homeassistant/homeassistant/helpers/entity.py", line 1148, in _async_write_ha_state
self.__async_calculate_state()
~~~~~~~~~~~~~~~~~~~~~~~~~~~~^^
File "/usr/src/homeassistant/homeassistant/helpers/entity.py", line 1085, in __async_calculate_state
state = self._stringify_state(available)
File "/usr/src/homeassistant/homeassistant/helpers/entity.py", line 1029, in _stringify_state
if (state := self.state) is None:
^^^^^^^^^^
File "/usr/src/homeassistant/homeassistant/components/sensor/init.py", line 520, in state
value = self.native_value
^^^^^^^^^^^^^^^^^
File "/config/custom_components/atonstorage/sensor.py", line 559, in native_value
value = self.entity_description.value_conversion_function(value)
File "/config/custom_components/atonstorage/sensor.py", line 454, in
value_conversion_function=lambda value: min(100, float(value)),
~~~~~^^^^^^^
TypeError: float() argument must be a string or a real number, not 'NoneType'

Source: helpers/entity_platform.py:928

Error adding entity sensor.xxxx_ev_charged_percentage for domain sensor with platform atonstorage
Traceback (most recent call last):
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 1384, in add_to_platform_finish
self.async_write_ha_state()
~~~~~~~~~~~~~~~~~~~~~~~~~^^
File "/usr/src/homeassistant/homeassistant/helpers/entity.py", line 1023, in async_write_ha_state
self._async_write_ha_state()
~~~~~~~~~~~~~~~~~~~~~~~~~~^^
File "/usr/src/homeassistant/homeassistant/helpers/entity.py", line 1148, in _async_write_ha_state
self.__async_calculate_state()
~~~~~~~~~~~~~~~~~~~~~~~~~~~~^^
File "/usr/src/homeassistant/homeassistant/helpers/entity.py", line 1085, in __async_calculate_state
state = self._stringify_state(available)
File "/usr/src/homeassistant/homeassistant/helpers/entity.py", line 1029, in _stringify_state
if (state := self.state) is None:
^^^^^^^^^^
File "/usr/src/homeassistant/homeassistant/components/sensor/init.py", line 520, in state
value = self.native_value
^^^^^^^^^^^^^^^^^
File "/config/custom_components/atonstorage/sensor.py", line 559, in native_value
value = self.entity_description.value_conversion_function(value)
File "/config/custom_components/atonstorage/sensor.py", line 454, in
value_conversion_function=lambda value: min(100, float(value)),
~~~~~^^^^^^^
TypeError: float() argument must be a string or a real number, not 'NoneType'

Source: custom_components/atonstorage/controller.py:132

REST result could not be parsed as JSON

Source: custom_components/atonstorage/sensor.py:454

Error doing job: Task exception was never retrieved (None)
Traceback (most recent call last):
File "/usr/src/homeassistant/homeassistant/helpers/update_coordinator.py", line 268, in _handle_refresh_interval
await self._async_refresh(log_failures=True, scheduled=True)
File "/usr/src/homeassistant/homeassistant/helpers/update_coordinator.py", line 479, in _async_refresh
self.async_update_listeners()
~~~~~~~~~~~~~~~~~~~~~~~~~~~^^
File "/usr/src/homeassistant/homeassistant/helpers/update_coordinator.py", line 178, in async_update_listeners
update_callback()
~~~~~~~~~~~~~~~^^
File "/usr/src/homeassistant/homeassistant/helpers/update_coordinator.py", line 559, in _handle_coordinator_update
self.async_write_ha_state()
~~~~~~~~~~~~~~~~~~~~~~~~~^^
File "/usr/src/homeassistant/homeassistant/helpers/entity.py", line 1023, in async_write_ha_state
self._async_write_ha_state()
~~~~~~~~~~~~~~~~~~~~~~~~~~^^
File "/usr/src/homeassistant/homeassistant/helpers/entity.py", line 1148, in _async_write_ha_state
self.__async_calculate_state()
~~~~~~~~~~~~~~~~~~~~~~~~~~~~^^
File "/usr/src/homeassistant/homeassistant/helpers/entity.py", line 1085, in __async_calculate_state
state = self._stringify_state(available)
File "/usr/src/homeassistant/homeassistant/helpers/entity.py", line 1029, in _stringify_state
if (state := self.state) is None:
^^^^^^^^^^
File "/usr/src/homeassistant/homeassistant/components/sensor/init.py", line 520, in state
value = self.native_value
^^^^^^^^^^^^^^^^^
File "/config/custom_components/atonstorage/sensor.py", line 559, in native_value
value = self.entity_description.value_conversion_function(value)
File "/config/custom_components/atonstorage/sensor.py", line 454, in
value_conversion_function=lambda value: min(100, float(value)),
~~~~~^^^^^^^
TypeError: float() argument must be a string or a real number, not 'NoneType'

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