Skip to content

Commit

Permalink
Add default card titles
Browse files Browse the repository at this point in the history
  • Loading branch information
davet2001 committed Oct 30, 2024
1 parent 3ecd1b5 commit 8d9859e
Show file tree
Hide file tree
Showing 2 changed files with 8 additions and 0 deletions.
7 changes: 7 additions & 0 deletions src/hui-energy-elec-flow-card.ts
Original file line number Diff line number Diff line change
Expand Up @@ -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;
Expand Down
1 change: 1 addition & 0 deletions src/hui-power-flow-card.ts
Original file line number Diff line number Diff line change
Expand Up @@ -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) {
Expand Down

0 comments on commit 8d9859e

Please sign in to comment.