Skip to content

Home Assistant 20223.5.0 now throwing exception #217

@mcc05

Description

@mcc05

As of the latest version of HA, the status string returned from OTG is throwing an exception

Logger: homeassistant.components.mqtt.models
Source: components/sensor/init.py:583
Integration: MQTT (documentation, issues)
First occurred: 06:42:09 (2631 occurrences)
Last logged: 07:40:29

Exception raised when updating state of sensor.idealboiler_status_slave, topic: 'IdealBoiler/value/idealC40/status_slave' with payload: b'-C-F----'
Exception raised when updating state of sensor.idealboiler_status_slave, topic: 'IdealBoiler/value/idealC40' with payload: b'online'
Exception raised when updating state of sensor.idealboiler_status_master, topic: 'IdealBoiler/value/idealC40' with payload: b'online'
Exception raised when updating state of sensor.idealboiler_status_master, topic: 'IdealBoiler/value/idealC40/status_master' with payload: b'-D---W--'
Exception raised when updating state of sensor.idealboiler_status_slave, topic: 'IdealBoiler/value/idealC40/status_slave' with payload: b'--------'
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: '-D---W--'

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

Traceback (most recent call last):
File "/usr/src/homeassistant/homeassistant/components/mqtt/models.py", line 270, in process_write_state_requests
entity.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.idealboiler_status_master 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: -D---W-- (<class 'str'>)

Metadata

Metadata

Assignees

Labels

bugSomething isn't working

Projects

Status

No status

Milestone

No milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions