The integration I work on has an image sensor that updates every 1-2 second with an in-memory stream from a server and this is spamming the HA logbook with an entry every time the timestamp updates:
And that’s ultimately overwhelming it and crashed/hung my HA instance:
There’s no need to record that it changed - the last update time is being updated only to trigger HA to refresh the image in the dashboard. Could I perhaps stop doing that and instead use the homeassistant.update_entity to force it to update each time without changing the last updated time for the image? Is there another way to suppress the state logging for specific high churn sensors?
That looks promising but it looks like it’s limited only to state attributes and the last updated time is a full property on an Image class: @property
def image_last_updated(self) → datetime | None:
But looking at the source for Image, it seems that it’s already suppressing a couple of things:
_entity_component_unrecorded_attributes = frozenset(
{“access_token”, “entity_picture”}
)
And entity_picture is also a property: @property
def entity_picture(self) → str | None:
Just found out…
Just one MQTT-sensor that had every change of value logged.
All others hadn’t. No clue in the config or entity-properties.
Adding logging-setting didn’t help too.
Until I added an engineeringsunit.
Bit weird, but I suppose there is some scaling based on the unit going on, triggering logging when the scaling value is missing.