From ed875e0c02df6834a3dac9443533bfe97b05bca0 Mon Sep 17 00:00:00 2001 From: Bram Kragten Date: Thu, 24 Nov 2022 15:10:21 +0100 Subject: [PATCH] Rename gas energy to heating --- .../components/ha-energy-gas-settings.ts | 18 +++++++---- .../dialogs/dialog-energy-gas-settings.ts | 26 ++++++++------- .../energy/strategies/energy-strategy.ts | 4 ++- .../energy/hui-energy-distribution-card.ts | 2 +- .../energy/hui-energy-sources-table-card.ts | 2 +- src/translations/en.json | 32 +++++++++---------- 6 files changed, 47 insertions(+), 37 deletions(-) diff --git a/src/panels/config/energy/components/ha-energy-gas-settings.ts b/src/panels/config/energy/components/ha-energy-gas-settings.ts index 14f6653f05..89eebae81d 100644 --- a/src/panels/config/energy/components/ha-energy-gas-settings.ts +++ b/src/panels/config/energy/components/ha-energy-gas-settings.ts @@ -60,17 +60,19 @@ export class EnergyGasSettings extends LitElement {

- ${this.hass.localize("ui.panel.config.energy.gas.title")} + ${this.hass.localize("ui.panel.config.energy.heating.title")}

- ${this.hass.localize("ui.panel.config.energy.gas.sub")} + ${this.hass.localize("ui.panel.config.energy.heating.sub")} ${this.hass.localize("ui.panel.config.energy.gas.learn_more")}${this.hass.localize( + "ui.panel.config.energy.heating.learn_more" + )}

${gasValidation.map( @@ -83,7 +85,9 @@ export class EnergyGasSettings extends LitElement { ` )}

- ${this.hass.localize("ui.panel.config.energy.gas.gas_consumption")} + ${this.hass.localize( + "ui.panel.config.energy.heating.heating_consumption" + )}

${gasSources.map((source) => { const entityState = this.hass.states[source.stat_energy_from]; @@ -103,14 +107,14 @@ export class EnergyGasSettings extends LitElement { > ${this.hass.localize( - "ui.panel.config.energy.gas.add_gas_source" + "ui.panel.config.energy.heating.add_heating_source" )}
diff --git a/src/panels/config/energy/dialogs/dialog-energy-gas-settings.ts b/src/panels/config/energy/dialogs/dialog-energy-gas-settings.ts index ab9c5e1a8e..ac33fb3d38 100644 --- a/src/panels/config/energy/dialogs/dialog-energy-gas-settings.ts +++ b/src/panels/config/energy/dialogs/dialog-energy-gas-settings.ts @@ -96,7 +96,9 @@ export class DialogEnergyGasSettings .path=${mdiFire} style="--mdc-icon-size: 32px;" > - ${this.hass.localize("ui.panel.config.energy.gas.dialog.header")}`} + ${this.hass.localize( + "ui.panel.config.energy.heating.dialog.header" + )}`} @closed=${this.closeDialog} > ${this._error ? html`

${this._error}

` : ""} @@ -110,11 +112,11 @@ export class DialogEnergyGasSettings include-device-class="gas" .value=${this._source.stat_energy_from} .label=${`${this.hass.localize( - "ui.panel.config.energy.gas.dialog.gas_usage" + "ui.panel.config.energy.heating.dialog.heating_usage" )} (${ this._params.allowedGasUnitClass === undefined ? this.hass.localize( - "ui.panel.config.energy.gas.dialog.m3_or_kWh" + "ui.panel.config.energy.heating.dialog.m3_or_kWh" ) : pickableUnit })`} @@ -123,12 +125,14 @@ export class DialogEnergyGasSettings >

- ${this.hass.localize(`ui.panel.config.energy.gas.dialog.cost_para`)} + ${this.hass.localize( + `ui.panel.config.energy.heating.dialog.cost_para` + )}

` : ""} ${this.hass.localize( - "ui.panel.lovelace.cards.energy.energy_distribution.gas" + "ui.panel.lovelace.cards.energy.energy_distribution.heating" )}
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..13bbbd1fc2 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 @@ -823,7 +823,7 @@ export class HuiEnergySourcesTableCard ${this.hass.localize( - "ui.panel.lovelace.cards.energy.energy_sources_table.gas_total" + "ui.panel.lovelace.cards.energy.energy_sources_table.heating_total" )} ${compare diff --git a/src/translations/en.json b/src/translations/en.json index f46100b1b2..9c41128b7b 100755 --- a/src/translations/en.json +++ b/src/translations/en.json @@ -1481,19 +1481,19 @@ "energy_out_of_battery": "Energy coming out of the battery (kWh)" } }, - "gas": { - "title": "Gas Consumption", - "sub": "Let Home Assistant monitor your gas usage.", + "heating": { + "title": "Consumption for Heating", + "sub": "Let Home Assistant monitor your energy usage for heating.", "learn_more": "More information on how to get started.", - "gas_consumption": "Gas consumption", - "edit_gas_source": "Edit gas source", - "delete_gas_source": "Delete gas source", - "add_gas_source": "Add gas source", + "heating_consumption": "Heating consumption", + "edit_heating_source": "Edit heating source", + "delete_heating_source": "Delete heating source", + "add_heating_source": "Add heating source", "dialog": { - "header": "Configure gas consumption", - "paragraph": "Gas consumption is the volume of gas that flows to your home.", + "header": "Configure heating consumption", + "paragraph": "Heating consumption is the volume of gas or energy that you use to heat your home.", "energy_stat": "Consumed Energy (m³)", - "cost_para": "Select how Home Assistant should keep track of the costs of the consumed energy.", + "cost_para": "Select how Home Assistant should keep track of the costs of heating.", "no_cost": "Do not track costs", "cost_stat": "Use an entity tracking the total costs", "cost_stat_input": "Total Costs Entity", @@ -1501,7 +1501,7 @@ "cost_entity_input": "Entity with the current price per {unit}", "cost_number": "Use a static price", "cost_number_input": "Price per {unit}", - "gas_usage": "Gas usage", + "heating_usage": "Heating usage", "m3_or_kWh": "ft³, m³, Wh, kWh, MWh or GJ" } }, @@ -1515,7 +1515,7 @@ "add_water_source": "Add water source", "dialog": { "header": "Configure water consumption", - "paragraph": "Gas consumption is the volume of water that flows to your home.", + "paragraph": "Water consumption is the volume of water that flows to your home.", "energy_stat": "Consumed water (m³ or gl)", "cost_para": "Select how Home Assistant should keep track of the costs of the consumed water.", "no_cost": "Do not track costs", @@ -1570,7 +1570,7 @@ }, "entity_unexpected_unit_gas": { "title": "Unexpected unit of measurement", - "description": "The following entities do not have the expected units of measurement 'Wh', 'kWh', 'MWh' or 'GJ' for an energy sensor or 'm³' or 'ft³' for a gas sensor:" + "description": "The following entities do not have the expected units of measurement 'Wh', 'kWh', 'MWh' or 'GJ' for an energy sensor or 'm³' or 'ft³' for a heating sensor:" }, "entity_unexpected_unit_water": { "title": "Unexpected unit of measurement", @@ -3727,7 +3727,7 @@ }, "energy_sources_table": { "grid_total": "Grid total", - "gas_total": "Gas total", + "heating_total": "Heating total", "water_total": "Water total", "source": "Source", "energy": "Energy", @@ -3758,7 +3758,7 @@ "energy_distribution": { "title_today": "Energy distribution today", "grid": "Grid", - "gas": "Gas", + "heating": "Heating", "water": "Water", "solar": "Solar", "low_carbon": "Low-carbon", @@ -4861,7 +4861,7 @@ "cards": { "energy_usage_graph_title": "Energy usage", "energy_solar_graph_title": "Solar production", - "energy_gas_graph_title": "Gas consumption", + "energy_heating_graph_title": "Consumption for heating", "energy_water_graph_title": "Water consumption", "energy_distribution_title": "Energy distribution", "energy_sources_table_title": "Sources",