Document energy_date_selection feature of Statistic card (#37650)

* Update statistic.markdown

* Update statistic.markdown

* Update statistic.markdown
This commit is contained in:
karwosts 2025-02-24 05:16:31 -08:00 committed by GitHub
parent 03ccb08e96
commit 1aa8a7436f
No known key found for this signature in database
GPG Key ID: B5690EEEBB952194

View File

@ -64,6 +64,10 @@ footer:
required: false required: false
description: Footer widget to render. See [footer documentation](/dashboards/header-footer/). description: Footer widget to render. See [footer documentation](/dashboards/header-footer/).
type: map type: map
collection_key:
required: false
description: "If using `period: energy_date_selection`, you can set a custom key to match the optional key of an `energy-date-selection` card. This is not typically required, but can be useful if multiple date selection cards are used on the same view. See [energy documentation](/dashboards/energy/#using-multiple-collections)."
type: string
{% endconfiguration %} {% endconfiguration %}
## Example ## Example
@ -81,7 +85,7 @@ stat_type: change
## Options for period ## Options for period
Periods can be configured in 3 different ways: Periods can be configured in 4 different ways:
### Calendar ### Calendar
@ -177,3 +181,16 @@ period:
seconds: -10 seconds: -10
stat_type: change stat_type: change
``` ```
### Dynamic date selection
When placed on a view with an Energy date selection card, the statistic card can be linked to show data from the period selected on the date selection card.
Example of a period from the date selector:
```yaml
type: statistic
entity: sensor.energy_consumption
period: energy_date_selection
stat_type: change
```