Everything was working okay, but suddenly I’m getting a bunch of errors from my thermostat and I’m unable to set temperature or anything

Source: helpers/entity.py:1125
First occurred: 5 January 2024 at 22:20:54 (4 occurrences)
Last logged: 08:35:01

Failed to set state for sensor.0x003c84fffef2dac7_program, fall back to unknown
Traceback (most recent call last):
  File "/usr/src/homeassistant/homeassistant/helpers/entity.py", line 1125, in _async_write_ha_state
    hass.states.async_set(
  File "/usr/src/homeassistant/homeassistant/core.py", line 1831, in async_set
    state = State(
            ^^^^^^
  File "/usr/src/homeassistant/homeassistant/core.py", line 1408, in __init__
    validate_state(state)
  File "/usr/src/homeassistant/homeassistant/core.py", line 228, in validate_state
    raise InvalidStateError(
homeassistant.exceptions.InvalidStateError: Invalid state with length 934. State max length is 255 characters.

I’ve looked in Z2M and its exposing

{
    "child_lock": "UNLOCK",
    "current_heating_setpoint": 15,
    "heat": "OFF",
    "linkquality": 224,
    "local_temperature": 14.5,
    "local_temperature_calibration": -2,
    "max_temperature": 45,
    "min_temperature_limit": 5,
    "preset": "hold",
    "preset_mode": "hold",
    "program": {
        "saturday_p1_hour": 6,
        "saturday_p1_minute": 0,
        "saturday_p1_temperature": 14,
        "saturday_p2_hour": 8,
        "saturday_p2_minute": 0,
        "saturday_p2_temperature": 16,
        "saturday_p3_hour": 8,
        "saturday_p3_minute": 30,
        "saturday_p3_temperature": 15,
        "saturday_p4_hour": 20,
        "saturday_p4_minute": 0,
        "saturday_p4_temperature": 12,
        "sunday_p1_hour": 6,
        "sunday_p1_minute": 0,
        "sunday_p1_temperature": 14,
        "sunday_p2_hour": 12,
        "sunday_p2_minute": 30,
        "sunday_p2_temperature": 16,
        "sunday_p3_hour": 14,
        "sunday_p3_minute": 30,
        "sunday_p3_temperature": 15,
        "sunday_p4_hour": 18,
        "sunday_p4_minute": 30,
        "sunday_p4_temperature": 12,
        "weekdays_p1_hour": 6,
        "weekdays_p1_minute": 0,
        "weekdays_p1_temperature": 14,
        "weekdays_p2_hour": 8,
        "weekdays_p2_minute": 0,
        "weekdays_p2_temperature": 16,
        "weekdays_p3_hour": 8,
        "weekdays_p3_minute": 30,
        "weekdays_p3_temperature": 15,
        "weekdays_p4_hour": 20,
        "weekdays_p4_minute": 0,
        "weekdays_p4_temperature": 12
    },
    "running_state": "idle",
    "sensor": "AL",
    "system_mode": "heat",
    "deadzone_temperature": null,
    "max_temperature_limit": null
}

The log is showing this

Any idea on what’s gone wrong?

Edit: Since I had to reinstall Raspberry Pi OS anyway, I just decided to start again. Hopefully adding the thermostat to HA anew will fix it.