Error sensor 4noks
renzonico opened this issue · comments
Dear,
i have this error:
Logger: homeassistant.components.sensor
Source: components/sensor/init.py:583
Integration: Sensore (documentation, issues)
First occurred: 11:04:22 (2 occurrences)
Last logged: 11:04:26
Error while setting up 4_noks platform for sensor
Traceback (most recent call last):
File "/usr/src/homeassistant/homeassistant/components/sensor/init.py", line 579, in state
numerical_value = int(value)
ValueError: invalid literal for int() with base 10: '15/05/2023 09:07:04'
The above exception was the direct cause of the following exception:
Traceback (most recent call last):
File "/usr/src/homeassistant/homeassistant/helpers/entity_platform.py", line 304, in _async_setup_platform
await asyncio.shield(task)
File "/config/custom_components/4_noks/sensor.py", line 65, in async_setup_entry
await coordinator.async_refresh()
File "/usr/src/homeassistant/homeassistant/helpers/update_coordinator.py", line 237, in async_refresh
await self._async_refresh(log_failures=True)
File "/usr/src/homeassistant/homeassistant/helpers/update_coordinator.py", line 349, in _async_refresh
self.async_update_listeners()
File "/usr/src/homeassistant/homeassistant/helpers/update_coordinator.py", line 146, in async_update_listeners
update_callback()
File "/usr/src/homeassistant/homeassistant/helpers/update_coordinator.py", line 406, in _handle_coordinator_update
self.async_write_ha_state()
File "/usr/src/homeassistant/homeassistant/helpers/entity.py", line 585, in async_write_ha_state
self._async_write_ha_state()
File "/usr/src/homeassistant/homeassistant/helpers/entity.py", line 649, in _async_write_ha_state
state = self._stringify_state(available)
File "/usr/src/homeassistant/homeassistant/helpers/entity.py", line 591, in _stringify_state
if (state := self.state) is None:
File "/usr/src/homeassistant/homeassistant/components/sensor/init.py", line 583, in state
raise ValueError(
ValueError: Sensor sensor.4_noks_5eb70c8c_utc_time has device class None, state class None unit and suggested precision None thus indicating it has a numeric value; however, it has the non-numeric value: 15/05/2023 09:07:04 (<class 'str'>)
Please help me
Please check the last release: 0.0.2
EDIT
Sorry... release 0.0.3
Thank you..now is perfect