From f9692995678baf2bee4788e9a48602f8f7041951 Mon Sep 17 00:00:00 2001 From: RoboMagus <68224306+RoboMagus@users.noreply.github.com> Date: Mon, 28 Nov 2022 12:46:42 +0100 Subject: [PATCH] Fix water comparison in EnergyDashboard (#14460) fixes undefined --- src/data/energy.ts | 2 +- .../lovelace/cards/energy/hui-energy-sources-table-card.ts | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/src/data/energy.ts b/src/data/energy.ts index 11435ffc69..3e412bd127 100644 --- a/src/data/energy.ts +++ b/src/data/energy.ts @@ -450,7 +450,7 @@ const getEnergyData = async ( )), ...(await fetchStatistics( hass!, - startMinHour, + compareStartMinHour, end, waterStatIds, period, diff --git a/src/panels/lovelace/cards/energy/hui-energy-sources-table-card.ts b/src/panels/lovelace/cards/energy/hui-energy-sources-table-card.ts index bea1930540..d44bd49f5d 100644 --- a/src/panels/lovelace/cards/energy/hui-energy-sources-table-card.ts +++ b/src/panels/lovelace/cards/energy/hui-energy-sources-table-card.ts @@ -980,7 +980,7 @@ export class HuiEnergySourcesTableCard class="mdc-data-table__cell mdc-data-table__cell--numeric" > ${formatNumber(totalWaterCompare, this.hass.locale)} - ${gasUnit} + ${waterUnit} ${showCosts ? html`