Weird issue. Been running HA for years, never an issue. Since a couple of version, HA keeps restarting every 5-10 min. I was running on Rpi4 and it got really hot. Thought it was the Rpi4 that was the issue so installed HA OS on a mini pc and after restoring, I get the same issue. It seems related to
2023-09-15 16:57:35.829 ERROR (MainThread) [homeassistant.helpers.entity] Failed to set state, fall back to unknown
Traceback (most recent call last):
File "/usr/src/homeassistant/homeassistant/helpers/entity.py", line 856, in _async_write_ha_state
hass.states.async_set(
File "/usr/src/homeassistant/homeassistant/core.py", line 1645, in async_set
state = State(
^^^^^^
File "/usr/src/homeassistant/homeassistant/core.py", line 1264, in __init__
validate_state(state)
File "/usr/src/homeassistant/homeassistant/core.py", line 180, in validate_state
raise InvalidStateError(
homeassistant.exceptions.InvalidStateError: Invalid state with length 289. State max length is 255 characters.
Trying to force a state and then crash maybe? Just canât find why it does that and where.
The error looks to be to do with a helper getting a state that is incorrect. Go to settings|devices and services|helpers. One of them seems to be screwy, it has a length of 289, whereas the max is 255. This is what I am guessing from your error message.
got onto the same issue, did you find out faulty thing?
can we turn on more logging to tell which state it is exacly?
ill let you know when i find mineâŚ
Failed to set state, fall back to unknown
Traceback (most recent call last):
File "/usr/src/homeassistant/homeassistant/helpers/entity.py", line 856, in _async_write_ha_state
hass.states.async_set(
File "/usr/src/homeassistant/homeassistant/core.py", line 1645, in async_set
state = State(
^^^^^^
File "/usr/src/homeassistant/homeassistant/core.py", line 1264, in __init__
validate_state(state)
File "/usr/src/homeassistant/homeassistant/core.py", line 180, in validate_state
raise InvalidStateError(
homeassistant.exceptions.InvalidStateError: Invalid state with length 716. State max length is 255 characters.
FWIW this âhelper entityâ entity.py is not the problem itâs a core âprocessâ
So as mention by nickrout a full core-log is required, as this âinitialâ just saying âbasicallyâ set state = state, best would be a log with debug-level
OK, just looked briefly in posted log , start with disable your google-integration
( KeyError: âgoogle_assistantâ )
Then your âNotificationâ
Then WLED
eventually you should be able to figure out whatâs going on
And âdumpâ your DB-file, itâs corrupt anyway
And why is your âxiaomi_gatewayâ not responding ? lost in your network, or new IP ?
Best would be to delete/rmove ALL 3 db-files, temporary datas/transactions are stored there, and might be ingested in the new build
ok, i recently discovered that very same with my Aquara M2, actually after 2023.10.0, unfortunately it was also âgoneâ in my Router, so i had to re-add ( + same procedure as the very first time, if you âhappensâ to factory reset ! )
2023-10-12 15:53:11.695 WARNING (SyncWorker_3) [homeassistant.loader] We found a custom integration hacs which has not been tested by Home Assistant. This component might cause stability problems, be sure to disable it if you experience issues with Home Assistant
2023-10-12 15:53:23.069 ERROR (MainThread) [homeassistant.components.notify] Failed to initialize notification service nfandroidtv
2023-10-12 15:53:34.916 ERROR (SyncWorker_0) [xiaomi_gateway] Cannot connect to gateway 7c49eb1d8cc0
2023-10-12 15:53:44.929 ERROR (SyncWorker_0) [xiaomi_gateway] Cannot connect to gateway 7c49eb1d8cc0
2023-10-12 15:53:54.943 ERROR (SyncWorker_0) [xiaomi_gateway] Cannot connect to gateway 7c49eb1d8cc0
2023-10-12 15:53:58.301 WARNING (MainThread) [homeassistant.components.ps4.media_player] PS4 could not be reached
2023-10-12 15:54:04.956 ERROR (SyncWorker_0) [xiaomi_gateway] Cannot connect to gateway 7c49eb1d8cc0
2023-10-12 15:54:14.967 ERROR (SyncWorker_0) [xiaomi_gateway] Cannot connect to gateway 7c49eb1d8cc0
Ok, i assume you see whatâs left to âtry to doâ there, and how does your other logfiles look like, i.e Host , Supervisor ?
Thou your missing gateway is hopefully your zigbee hub, it should not cause your HA to Reboot, rapidly increasing logfiles/db files will among other thigs
Also you didnât mention whether you used the same âinstall-mediaâ as you had inEpi4, ?
Another âapproachâ could be go further back in time, and pic a backup, prio to the time when all this started to occur