Closed swa72 closed 1 year ago
I can confirm seeing this also since update this morning.
Hey there @molobrakos, mind taking a look at this issue as it has been labeled with an integration (volvooncall
) you are listed as a code owner for? Thanks!
(message by CodeOwnersMention)
volvooncall documentation volvooncall source (message by IssueLinks)
Same issue here.
Same problem for me.
Updated to 2023.5 and get the following exception. I actually think it was working on 2023.4
2023-05-06 10:29:07.403 ERROR (MainThread) [homeassistant] Error doing job: Task exception was never retrieved
Traceback (most recent call last):
File "/usr/src/homeassistant/homeassistant/components/sensor/__init__.py", line 581, in state
numerical_value = float(value) # type:ignore[arg-type]
TypeError: float() argument must be a string or a real number, not 'datetime.datetime'
The above exception was the direct cause of the following exception:
Traceback (most recent call last):
File "/usr/src/homeassistant/homeassistant/helpers/update_coordinator.py", line 204, in _handle_refresh_interval
await self._async_refresh(log_failures=True, scheduled=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/components/volvooncall/sensor.py", line 74, 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.<plate>_last_trip 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: 2023-05-01 20:03:44+02:00 (<class 'datetime.datetime'>)
Same problem for me. HA 2023.5.2. Seems to fix itself for a while after reloading the integration, but then fails again
I am seeing the same problem with 2023.5.2.
Seems that the problem with "sensor.[plate]_last_trip" is preventing the integration from running properly once loaded. So I disabled that sensor in the VOC integration and so far the integration has stayed up. I know it's only a work-around, but I don't need to see last_trip.
I've created this PR, that probably will handle this.
Also being discussed in #92746. I've merged your PR into my own that does a more holistic fix. Just waiting for GitHub Actions to stop being broken (it's broadly down right now apparently) and then I can publish and bring the fix into HA core.
The problem
Warning in Logs (only sensor that gets warning
What version of Home Assistant Core has the issue?
core-2023.4.1
What was the last working version of Home Assistant Core?
No response
What type of installation are you running?
Home Assistant OS
Integration causing the issue
No response
Link to integration documentation on our website
No response
Diagnostics information
No response
Example YAML snippet
No response
Anything in the logs that might be useful for us?
No response
Additional information
No response