ha-jokes
ha-jokes copied to clipboard
HA doesn't accept more than 255 chars
homeassistant.exceptions.InvalidStateError: Invalid state encountered for entity ID: sensor.random_joke. State max length is 255 characters.
State attributes are able to store more than 255 characters
The issue is not resolved. i downloaded the latest version but i still get the issues
Logger: homeassistant.helpers.entity
Source: helpers/entity.py:1227
First occurred: 28 March 2025 at 18:41:24 (22 occurrences)
Last logged: 14:16:05
Failed to set state for sensor.random_joke, fall back to unknown
Traceback (most recent call last):
File "/usr/src/homeassistant/homeassistant/helpers/entity.py", line 1227, in _async_write_ha_state
hass.states.async_set_internal(
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~^
entity_id,
^^^^^^^^^^
...<5 lines>...
time_now,
^^^^^^^^^
)
^
File "/usr/src/homeassistant/homeassistant/core.py", line 2363, in async_set_internal
state = State(
entity_id,
...<8 lines>...
timestamp,
)
File "/usr/src/homeassistant/homeassistant/core.py", line 1807, in __init__
validate_state(state)
~~~~~~~~~~~~~~^^^^^^^
File "/usr/src/homeassistant/homeassistant/core.py", line 237, in validate_state
raise InvalidStateError(
...<2 lines>...
)
homeassistant.exceptions.InvalidStateError: Invalid state with length 258. State max length is 255 characters.