Skip to content

Commit c466b5c

Browse files
committed
remove unused code
1 parent 7715749 commit c466b5c

File tree

6 files changed

+2
-284
lines changed

6 files changed

+2
-284
lines changed

src/panels/energy/strategies/energy-overview-view-strategy.ts

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -25,7 +25,7 @@ export class EnergyViewStrategy extends ReactiveElement {
2525
});
2626
const prefs = energyCollection.prefs;
2727

28-
// No energy sources available, start from scratch
28+
// No energy sources available
2929
if (
3030
!prefs ||
3131
(prefs.device_consumption.length === 0 &&

src/panels/energy/strategies/energy-view-strategy.ts

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -23,7 +23,7 @@ export class EnergyViewStrategy extends ReactiveElement {
2323
});
2424
const prefs = energyCollection.prefs;
2525

26-
// No energy sources available, start from scratch
26+
// No energy sources available
2727
if (
2828
!prefs ||
2929
(prefs.device_consumption.length === 0 &&

src/panels/lovelace/cards/energy/hui-energy-gas-graph-card.ts

Lines changed: 0 additions & 22 deletions
Original file line numberDiff line numberDiff line change
@@ -131,28 +131,6 @@ export class HuiEnergyGasGraphCard
131131
`;
132132
}
133133

134-
private _getTotal = () => {
135-
if (!this._chartData.length) {
136-
return "";
137-
}
138-
return (
139-
formatNumber(
140-
this._chartData.reduce(
141-
(sum, dataset) =>
142-
sum +
143-
(dataset.data || []).reduce(
144-
(acc: number, curr) =>
145-
acc + (Array.isArray(curr) ? curr[1] : (curr as any).value[1]),
146-
0
147-
),
148-
0
149-
)
150-
) +
151-
" " +
152-
this._unit
153-
);
154-
};
155-
156134
private _formatTotal = (total: number) =>
157135
this.hass.localize(
158136
"ui.panel.lovelace.cards.energy.energy_gas_graph.total_consumed",

src/panels/lovelace/cards/hui-energy-summary-card.ts

Lines changed: 0 additions & 228 deletions
This file was deleted.

src/panels/lovelace/cards/types.ts

Lines changed: 0 additions & 14 deletions
Original file line numberDiff line numberDiff line change
@@ -29,7 +29,6 @@ import type {
2929
import type { LovelaceHeaderFooterConfig } from "../header-footer/types";
3030
import type { LovelaceHeadingBadgeConfig } from "../heading-badges/types";
3131
import type { HomeSummary } from "../strategies/home/helpers/home-summaries";
32-
import type { EnergySummary } from "../strategies/energy/helpers/energy-summaries";
3332
import type { MediaSelectorValue } from "../../../data/selector";
3433

3534
export type AlarmPanelCardConfigState =
@@ -151,11 +150,6 @@ export interface EnergyCardBaseConfig extends LovelaceCardConfig {
151150
collection_key?: string;
152151
}
153152

154-
export interface EnergySummaryCardConfig extends EnergyCardBaseConfig {
155-
type: "energy-summary";
156-
title?: string;
157-
}
158-
159153
export interface EnergyDistributionCardConfig extends EnergyCardBaseConfig {
160154
type: "energy-distribution";
161155
title?: string;
@@ -614,11 +608,3 @@ export interface HomeSummaryCard extends LovelaceCardConfig {
614608
hold_action?: ActionConfig;
615609
double_tap_action?: ActionConfig;
616610
}
617-
618-
export interface EnergySummaryCard extends LovelaceCardConfig {
619-
summary: EnergySummary;
620-
vertical?: boolean;
621-
tap_action?: ActionConfig;
622-
hold_action?: ActionConfig;
623-
double_tap_action?: ActionConfig;
624-
}

src/panels/lovelace/strategies/energy/helpers/energy-summaries.ts

Lines changed: 0 additions & 18 deletions
This file was deleted.

0 commit comments

Comments
 (0)