I am terribly sorry for the mix up, I did include as much information as I could.
To answer your second question, I ‘do not’ do that, it is just the sequence I noticed. Checking my logs for another issue, I came across this now for the first time, not sure if this would assist with identifying the issue.
Logger: homeassistant.components.mqtt.models
Source: components/sensor/init.py:585
Integration: MQTT (documentation, issues)
First occurred: 8:12:06 AM (26197 occurrences)
Last logged: 11:46:32 PM
Exception raised when updating state of sensor.device_mode, topic: ‘solar_assistant2/inverter_1/device_mode/state’ with payload: b’Grid’
Exception raised when updating state of sensor.device_mode, topic: ‘solar_assistant2/inverter_1/device_mode/state’ with payload: b’Solar/Battery’
Traceback (most recent call last):
File “/usr/src/homeassistant/homeassistant/components/sensor/init.py”, line 581, in state
numerical_value = int(value)
^^^^^^^^^^
ValueError: invalid literal for int() with base 10: ‘Grid’
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 590, in async_write_ha_state
self._async_write_ha_state()
File “/usr/src/homeassistant/homeassistant/helpers/entity.py”, line 654, in _async_write_ha_state
state = self._stringify_state(available)
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
File “/usr/src/homeassistant/homeassistant/helpers/entity.py”, line 596, in _stringify_state
if (state := self.state) is None:
^^^^^^^^^^
File “/usr/src/homeassistant/homeassistant/components/sensor/init.py”, line 585, in state
raise ValueError(
ValueError: Sensor sensor.device_mode has device class ‘None’, state class ‘None’ unit ‘keyed’ and suggested precision ‘None’ thus indicating it has a numeric value; however, it has the non-numeric value: ‘Grid’ (<class ‘str’>)
I have read it, but I do not understand it.