From 8d9859effcc23f913f24624e6a017872668928c8 Mon Sep 17 00:00:00 2001 From: Dave T <17680170+davet2001@users.noreply.github.com> Date: Wed, 30 Oct 2024 22:23:44 +0000 Subject: [PATCH] Add default card titles --- src/hui-energy-elec-flow-card.ts | 7 +++++++ src/hui-power-flow-card.ts | 1 + 2 files changed, 8 insertions(+) diff --git a/src/hui-energy-elec-flow-card.ts b/src/hui-energy-elec-flow-card.ts index 9fad7dc..caccea2 100644 --- a/src/hui-energy-elec-flow-card.ts +++ b/src/hui-energy-elec-flow-card.ts @@ -66,6 +66,13 @@ export class HuiEnergyElecFlowCard this._config = config; } + static getStubConfig(): EnergyElecFlowCardConfig { + return { + type: "custom:hui-energy-elec-flow-card", + title: "Energy distribution today", + }; + } + protected render() { if (!this.hass || !this._config) { return nothing; diff --git a/src/hui-power-flow-card.ts b/src/hui-power-flow-card.ts index c2af9c6..8439c3b 100644 --- a/src/hui-power-flow-card.ts +++ b/src/hui-power-flow-card.ts @@ -161,6 +161,7 @@ class HuiPowerFlowCard extends LitElement implements LovelaceCard { let returnConfig: PowerFlowCardConfig = { type: "custom:hui-power-flow-card", + title: "Live power flow", } // Parse energy sources from HA's energy prefs for (const source of energyPrefs.energy_sources) {