Fix compare button for energy cards on manual dashboard (#16579)

This commit is contained in:
karwosts 2023-05-23 05:55:12 -07:00 committed by GitHub
parent c5205ae8db
commit aea098ff17
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23

View File

@ -272,7 +272,7 @@ export class HuiEnergyPeriodSelector extends SubscribeMixin(LitElement) {
private _toggleCompare() {
this._compare = !this._compare;
const energyCollection = getEnergyDataCollection(this.hass, {
key: "energy_dashboard",
key: this.collectionKey,
});
energyCollection.setCompare(this._compare);
energyCollection.refresh();