mirror of
https://github.com/home-assistant/developers.home-assistant.git
synced 2025-07-16 05:46:30 +00:00
Add warning about changing device_class etc for entities (#2019)
This commit is contained in:
parent
1bb99f3928
commit
7b109160ce
@ -84,6 +84,12 @@ To avoid calculations in a property method, set the corresponding [entity class
|
||||
| supported_features | <code>int | None</code> | `None` | Flag features supported by the entity. Domains specify their own.
|
||||
| translation_key | <code>str | None</code> | `None` | A key for looking up translations of the entity's state in [`entity` section of the integration's `strings.json`](/docs/internationalization/core#state-of-entities).
|
||||
|
||||
:::warning
|
||||
It's allowed to change `device_class`, `supported_features` or any property included in a domain's `capability_attributes`. However, since these entity properties often are not expected to change at all and some entity consumers may not be able to update them at a free rate, we recommend only changing them when absolutely required and at a modest interval.
|
||||
|
||||
As an example, such changes will cause voice assistant integrations to resynchronize with the supporting cloud service.
|
||||
:::
|
||||
|
||||
:::warning
|
||||
Entities that generate a significant amount of state changes can quickly increase the size of the database when the `extra_state_attributes` also change frequently. Minimize the number of `extra_state_attributes` for these entities by removing non-critical attributes or creating additional `sensor` entities.
|
||||
:::
|
||||
|
Loading…
x
Reference in New Issue
Block a user