2023.5 Log Details (ERROR)

Hi, This is my first post, so apologies if I have put this in the wrong area, but I could do with some advice.

I have just upgraded to the latest version:-
Home Assistant 2023.5.0
Supervisor 2023.04.1
Operating System 10.1
Frontend 20230503.1 - latest

And have started to see the error below, I don’t remember seeing it before the upgrade, any ideas anyone ?

Logger: homeassistant
Source: components/sensor/init.py:583
First occurred: 3 May 2023 at 23:52:10 (8319 occurrences)
Last logged: 00:15:34

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]
ValueError: could not convert string to float: b’167091W’

The above exception was the direct cause of the following exception:

Traceback (most recent call last):
File “/usr/src/homeassistant/homeassistant/helpers/entity.py”, line 572, in async_update_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.victron_grid_serial_31 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: b’167091W’ (<class ‘bytes’>)

Did you update to the latest version of the Victron integration?

Hi Chris,

Yes, Its V0.0.9 which is the latest according to Github.

I have even reloaded the Victron Integration, and restarted HA, but still the same error.

I am also seeing other errors too, it seems as though something in the latest version of HA has upset this integration.

Logger: homeassistant.components.binary_sensor
Source: components/sensor/init.py:583
Integration: Binary Sensor (documentation, issues)
First occurred: 15:07:24 (1 occurrences)
Last logged: 15:07:24

victron: Error on device update!
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]
ValueError: could not convert string to float: b’167091W’

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 521, in _async_add_entity
await entity.async_device_update(warning=False)
File “/usr/src/homeassistant/homeassistant/helpers/entity.py”, line 784, in async_device_update
await coro
File “/usr/src/homeassistant/homeassistant/helpers/update_coordinator.py”, line 444, in async_update
await self.coordinator.async_request_refresh()
File “/usr/src/homeassistant/homeassistant/helpers/update_coordinator.py”, line 211, in async_request_refresh
await self._debounced_refresh.async_call()
File “/usr/src/homeassistant/homeassistant/helpers/debounce.py”, line 95, in async_call
await task
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.victron_grid_serial_31 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: b’167091W’ (<class ‘bytes’>)

I don’t think the 0.0.9 release has the fixes that seem to match your issue

Thanks for spotting that.

Looks like it’s currently going through testing as you say, hopefully it will be fixed soon in the next release.

Version 0.0.10 of the Victron integration has been released which has fixed this error.