State max length is 255 characters

Hello!

I used to monitor my ubuntu services via command_line sensor.

  - platform: command_line
    name: "Zoneminder State"
    command: "systemctl status zoneminder"
    scan_interval: 600

Since i updated to 57.1 its just says

homeassistant.exceptions.InvalidStateError: Invalid state encountered for entity id: sensor.zoneminder_state. State max length is 255 characters.

Is there any workaround for that?

systemctl is-active zoneminder that give a real sensor output

Lifesaver. Thanks!

Any idea the correct format this should be. I’m also getting the same error.

homeassistant.exceptions.InvalidStateError: Invalid state encountered for entity id: sensor.ycam_snapshot. State max length is 255 characters.

sensor:
  - platform: command_line
    name: Y-Cam Snapshot
    command: /home/pi/.homeassistant/shell_scripts/test.sh