Log Entry Question

Does anyone know of a good resource to help understand HA log messages?

As an example, I had the below in my logs this morning but I don’t know which script it’s referring to.

Logger: frontend.js.latest.202305033
Source: components/system_log/__init__.py:257 
First occurred: June 2, 2023 at 11:33:22 PM (1 occurrences)
Last logged: June 2, 2023 at 11:33:22 PM

:0:0 Script error.

Also, I would like to be able to understand exactly what this type of log message is trying to tell me:

Logger: homeassistant.helpers.event
Source: core.py:1225 
First occurred: June 2, 2023 at 6:44:04 PM (17 occurrences) 
Last logged: June 2, 2023 at 11:28:58 PM

Error while processing state change for sensor.zenwifi_xt9_eb50_kib_s_received
Error while processing state change for sensor.devices_offline
Error while processing state change for light.kitchen_lights_all
Error while processing state change for light.stairs_light
Error while processing state change for light.landing_light
Traceback (most recent call last):
  File "/usr/src/homeassistant/homeassistant/helpers/event.py", line 287, in _async_state_change_dispatcher
    hass.async_run_hass_job(job, event)
  File "/usr/src/homeassistant/homeassistant/core.py", line 607, in async_run_hass_job
    hassjob.target(*args)
  File "/usr/src/homeassistant/homeassistant/helpers/event.py", line 1133, in _refresh
    self.hass.async_run_hass_job(self._job, event, updates)
  File "/usr/src/homeassistant/homeassistant/core.py", line 607, in async_run_hass_job
    hassjob.target(*args)
  File "/usr/src/homeassistant/homeassistant/helpers/template_entity.py", line 348, in _handle_results
    self.async_write_ha_state()
  File "/usr/src/homeassistant/homeassistant/helpers/entity.py", line 585, in async_write_ha_state
    self._async_write_ha_state()
  File "/usr/src/homeassistant/homeassistant/helpers/entity.py", line 706, in _async_write_ha_state
    hass.states.async_set(entity_id, state, attr, self.force_update, self._context)
  File "/usr/src/homeassistant/homeassistant/core.py", line 1576, in async_set
    state = State(
  File "/usr/src/homeassistant/homeassistant/core.py", line 1225, in __init__
    raise InvalidStateError(
homeassistant.exceptions.InvalidStateError: Invalid state encountered for entity ID: sensor.unavailable_entities. State max length is 255 characters.

You are exceeding the maximum possible length for a state. Attributes can be longer.

Thanks Tom. Regarding the first example, do you know where can I find out more about deciphering that type of log message? I haven’t got a clue what it’s referring to, apart from it being a script…or are we not supposed to know?

You can search the open issues in the home assistant github repositories.

1 Like

You might get more information in the JS console of your browser (development tools)

1 Like

Thanks both.