+ ${isToday(this._start)
+ ? "There is no data to show. It can take up to 2 hours for new data to arrive after you configure your energy dashboard."
+ : "There is no data for this period."}
+
diff --git a/src/panels/lovelace/cards/energy/hui-energy-usage-graph-card.ts b/src/panels/lovelace/cards/energy/hui-energy-usage-graph-card.ts
index 94b4a388e5..a8fc4dc913 100644
--- a/src/panels/lovelace/cards/energy/hui-energy-usage-graph-card.ts
+++ b/src/panels/lovelace/cards/energy/hui-energy-usage-graph-card.ts
@@ -269,6 +269,10 @@ export class HuiEnergyUsageGraphCard
continue;
}
+ if (source.type !== "grid") {
+ continue;
+ }
+
// grid source
for (const flowFrom of source.flow_from) {
if (statistics.from_grid) {
diff --git a/src/panels/lovelace/cards/types.ts b/src/panels/lovelace/cards/types.ts
index 285f7798f6..ffc25948da 100644
--- a/src/panels/lovelace/cards/types.ts
+++ b/src/panels/lovelace/cards/types.ts
@@ -113,6 +113,12 @@ export interface EnergySolarGraphCardConfig extends LovelaceCardConfig {
collection_key?: string;
}
+export interface EnergyGasGraphCardConfig extends LovelaceCardConfig {
+ type: "energy-gas-graph";
+ title?: string;
+ collection_key?: string;
+}
+
export interface EnergyDevicesGraphCardConfig extends LovelaceCardConfig {
type: "energy-devices-graph";
title?: string;
diff --git a/src/panels/lovelace/create-element/create-card-element.ts b/src/panels/lovelace/create-element/create-card-element.ts
index 151f8b3638..6c8c470e35 100644
--- a/src/panels/lovelace/create-element/create-card-element.ts
+++ b/src/panels/lovelace/create-element/create-card-element.ts
@@ -39,6 +39,7 @@ const LAZY_LOAD_TYPES = {
import("../cards/energy/hui-energy-usage-graph-card"),
"energy-solar-graph": () =>
import("../cards/energy/hui-energy-solar-graph-card"),
+ "energy-gas-graph": () => import("../cards/energy/hui-energy-gas-graph-card"),
"energy-devices-graph": () =>
import("../cards/energy/hui-energy-devices-graph-card"),
"energy-sources-table": () =>
diff --git a/src/resources/ha-style.ts b/src/resources/ha-style.ts
index 1cf30e1054..f7b0acac80 100644
--- a/src/resources/ha-style.ts
+++ b/src/resources/ha-style.ts
@@ -90,6 +90,7 @@ documentContainer.innerHTML = `
--energy-non-fossil-color: #0f9d58;
--energy-battery-out-color: #4db6ac;
--energy-battery-in-color: #f06292;
+ --energy-gas-color: #8E021B;
/* opacity for dark text on a light background */
--dark-divider-opacity: 0.12;
diff --git a/src/translations/en.json b/src/translations/en.json
index ff9df30afb..4dbc1ce1e0 100755
--- a/src/translations/en.json
+++ b/src/translations/en.json
@@ -1051,6 +1051,25 @@
"sub": "If you have a battery system, you can configure it to monitor how much energy was stored and used from your battery.",
"learn_more": "More information on how to get started."
},
+ "gas": {
+ "title": "Gas Consumption",
+ "sub": "Let Home Assistant monitor your gas usage.",
+ "learn_more": "More information on how to get started.",
+ "dialog": {
+ "header": "Configure gas consumption",
+ "paragraph": "Gas consumption is the volume of gas that flows from to your home.",
+ "energy_stat": "Consumed Energy (m³)",
+ "cost_para": "Select how Home Assistant should keep track of the costs of the consumed energy.",
+ "no_cost": "Do not track costs",
+ "cost_stat": "Use an entity tracking the total costs",
+ "cost_stat_input": "Total Costs Entity",
+ "cost_entity": "Use an entity with current price",
+ "cost_entity_input": "Entity with the current price",
+ "cost_number": "Use a static price",
+ "cost_number_input": "Price per m³",
+ "cost_number_suffix": "{currency}/m³"
+ }
+ },
"device_consumption": {
"title": "Individual devices",
"sub": "Tracking the energy usage of individual devices allows Home Assistant to break down your energy usage by device.",