diff --git a/source/_dashboards/energy.markdown b/source/_dashboards/energy.markdown index d0101d4d697..d0ce5b5fc86 100644 --- a/source/_dashboards/energy.markdown +++ b/source/_dashboards/energy.markdown @@ -234,3 +234,28 @@ The following example limits the number of shown devices to 5: type: energy-devices-detail-graph max_devices: 5 ``` + +## Using Multiple Collections + +By default, all energy cards are linked to any `energy-date-selection` card on the view, and all `energy-date-selection` cards are linked to the same period. To enable multiple different date selections on the same view, it is necessary to link them to different collections. This is done by adding the variable `collection_key` to the card YAML, and giving this a value of any custom string that begins with `energy_`. (strings that do not start with `energy_` will generate an error). + +All energy cards support use of `collection_key` option. + +### Examples +Example view with multiple collections: + +```yaml +type: masonry +path: example +cards: + - type: energy-date-selection + - type: energy-date-selection + collection_key: energy_2 + + # This card is linked to the first (default) date selection + - type: energy-usage-graph + + # This card is linked to the second date selection + - type: energy-usage-graph + collection_key: energy_2 +```