From 1aa8a7436ffab8d82538b3c0b696e92cec825ba0 Mon Sep 17 00:00:00 2001 From: karwosts <32912880+karwosts@users.noreply.github.com> Date: Mon, 24 Feb 2025 05:16:31 -0800 Subject: [PATCH] Document `energy_date_selection` feature of Statistic card (#37650) * Update statistic.markdown * Update statistic.markdown * Update statistic.markdown --- source/_dashboards/statistic.markdown | 19 ++++++++++++++++++- 1 file changed, 18 insertions(+), 1 deletion(-) diff --git a/source/_dashboards/statistic.markdown b/source/_dashboards/statistic.markdown index e7d03df5ebf..68e65b163bf 100644 --- a/source/_dashboards/statistic.markdown +++ b/source/_dashboards/statistic.markdown @@ -64,6 +64,10 @@ footer: required: false description: Footer widget to render. See [footer documentation](/dashboards/header-footer/). 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 %} ## Example @@ -81,7 +85,7 @@ stat_type: change ## Options for period -Periods can be configured in 3 different ways: +Periods can be configured in 4 different ways: ### Calendar @@ -177,3 +181,16 @@ period: seconds: -10 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 +```