chickey/RS485-WiFi-EPEver

MQTT Exceptions in Home Assistant

Opened this issue · 0 comments

I'm getting these errors nonstop in home assistant logs

2023-09-02 13:58:25.589 ERROR (MainThread) [homeassistant.components.mqtt.models] Exception raised when updating state of sensor.epever_solar_monitor_battery_temperature_2, topic: 'solar/status' with payload: b'{"batt_volt":"Normal","batt_temp":"Normal","charger_mode":"Float"}'
Traceback (most recent call last):
  File "/usr/src/homeassistant/homeassistant/components/sensor/__init__.py", line 591, in state
    numerical_value = int(value)
                      ^^^^^^^^^^
ValueError: invalid literal for int() with base 10: 'Normal'

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 746, in async_write_ha_state
    self._async_write_ha_state()
  File "/usr/src/homeassistant/homeassistant/helpers/entity.py", line 808, in _async_write_ha_state
    state = self._stringify_state(available)
            ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
  File "/usr/src/homeassistant/homeassistant/helpers/entity.py", line 752, in _stringify_state
    if (state := self.state) is None:
                 ^^^^^^^^^^
  File "/usr/src/homeassistant/homeassistant/components/sensor/__init__.py", line 595, in state
    raise ValueError(
ValueError: Sensor sensor.epever_solar_monitor_battery_temperature_2 has device class 'temperature', state class 'None' unit 'C' and suggested precision 'None' thus indicating it has a numeric value; however, it has the non-numeric value: 'Normal' (<class 'str'>)
2023-09-02 13:58:25.599 ERROR (MainThread) [homeassistant.components.mqtt.models] Exception raised when updating state of sensor.epever_solar_monitor_battery_temperature, topic: 'solar/status' with payload: b'{"batt_volt":"Normal","batt_temp":"Normal","charger_mode":"Float"}'
Traceback (most recent call last):
  File "/usr/src/homeassistant/homeassistant/components/sensor/__init__.py", line 591, in state
    numerical_value = int(value)
                      ^^^^^^^^^^
ValueError: invalid literal for int() with base 10: 'Normal'

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 746, in async_write_ha_state
    self._async_write_ha_state()
  File "/usr/src/homeassistant/homeassistant/helpers/entity.py", line 808, in _async_write_ha_state
    state = self._stringify_state(available)
            ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
  File "/usr/src/homeassistant/homeassistant/helpers/entity.py", line 752, in _stringify_state
    if (state := self.state) is None:
                 ^^^^^^^^^^
  File "/usr/src/homeassistant/homeassistant/components/sensor/__init__.py", line 595, in state
    raise ValueError(
ValueError: Sensor sensor.epever_solar_monitor_battery_temperature has device class 'temperature', state class 'None' unit 'C' and suggested precision 'None' thus indicating it has a numeric value; however, it has the non-numeric value: 'Normal' (<class 'str'>)