Blog post on how to exclude state attributes from recording (#1927)

Co-authored-by: Martin Hjelmare <marhje52@gmail.com>
Co-authored-by: Franck Nijhof <git@frenck.dev>
This commit is contained in:
Erik Montnemery 2023-09-21 13:57:46 +02:00 committed by GitHub
parent f9ad66c6be
commit 6a3c7e9e8c
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23

View File

@ -0,0 +1,17 @@
---
author: Erik Montnémery
authorURL: https://github.com/emontnemery
title: "New way of excluding state attributes from recording"
---
The way in which state attributes are excluded from recording has changed
The recorder platforms have been replaced with two new attributes which can be set in classes derived from `Entity`:
- `_entity_component_unrecorded_attributes: frozenset[str]` - This should be set by base component entity classes, e.g. `LightEntity`
- `_unrecorded_attributes: frozenset[str]` - This should be set by derived platform classes, e.g. `HueLight` to exclude
additional, integration specific, attributes from recording.
More details can be found in the [entity documentation](/docs/core/entity#excluding-state-attributes-from-recorder-history).
Background for the change is in [architecture discussion #964](https://github.com/home-assistant/architecture/discussions/964).