mirror of
https://github.com/home-assistant/developers.home-assistant.git
synced 2025-07-17 06:16:28 +00:00
Document impact of extra_state_attributes
on frequently updating entities (#1245)
This commit is contained in:
parent
5ab770d4ee
commit
de074a2415
@ -73,6 +73,10 @@ Properties should always only return information from memory and not do I/O (lik
|
||||
| should_poll | boolean | `True` | Should Home Assistant check with the entity for an updated state. If set to `False`, entity will need to notify Home Assistant of new updates by calling one of the [schedule update methods](integration_fetching_data.md#push-vs-poll). |
|
||||
| unique_id | string | `None` | A unique identifier for this entity. Needs to be unique within a platform (ie `light.hue`). Should not be configurable by the user or be changeable. [Learn more.](entity_registry_index.md#unique-id-requirements) |
|
||||
|
||||
:::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.
|
||||
:::
|
||||
|
||||
## Advanced properties
|
||||
|
||||
The following properties are also available on entities. However, they are for advanced use only and should be used with caution.
|
||||
|
@ -19,6 +19,9 @@ Properties should always only return information from memory and not do I/O (lik
|
||||
| native_unit_of_measurement | string | `None` | The unit of measurement that the sensor's value is expressed in. If the `native_unit_of_measurement` is °C or °F, and its `device_class` is temperature, the sensor's `unit_of_measurement` will be the preferred temperature unit configured by the user and the sensor's `state` will be the `native_value` after an optional unit conversion.
|
||||
| state_class | string | `None` | Type of state.
|
||||
|
||||
:::tip
|
||||
Instead of adding `extra_state_attributes` for a sensor entity, create an additional sensor entity. Attributes that do not change are only saved in the database once. If `extra_state_attributes` and the sensor value both frequently change, this can quickly increase the size of the database.
|
||||
:::
|
||||
|
||||
### Available device classes
|
||||
|
||||
|
Loading…
x
Reference in New Issue
Block a user