Rename gas energy to heating

This commit is contained in:
Bram Kragten 2022-11-24 15:10:21 +01:00
parent 9bae4a646d
commit ed875e0c02
No known key found for this signature in database
GPG Key ID: FBE2DFDB363EF55B
6 changed files with 47 additions and 37 deletions

View File

@ -60,17 +60,19 @@ export class EnergyGasSettings extends LitElement {
<ha-card outlined> <ha-card outlined>
<h1 class="card-header"> <h1 class="card-header">
<ha-svg-icon .path=${mdiFire}></ha-svg-icon> <ha-svg-icon .path=${mdiFire}></ha-svg-icon>
${this.hass.localize("ui.panel.config.energy.gas.title")} ${this.hass.localize("ui.panel.config.energy.heating.title")}
</h1> </h1>
<div class="card-content"> <div class="card-content">
<p> <p>
${this.hass.localize("ui.panel.config.energy.gas.sub")} ${this.hass.localize("ui.panel.config.energy.heating.sub")}
<a <a
target="_blank" target="_blank"
rel="noopener noreferrer" rel="noopener noreferrer"
href=${documentationUrl(this.hass, "/docs/energy/gas/")} href=${documentationUrl(this.hass, "/docs/energy/gas/")}
>${this.hass.localize("ui.panel.config.energy.gas.learn_more")}</a >${this.hass.localize(
"ui.panel.config.energy.heating.learn_more"
)}</a
> >
</p> </p>
${gasValidation.map( ${gasValidation.map(
@ -83,7 +85,9 @@ export class EnergyGasSettings extends LitElement {
` `
)} )}
<h3> <h3>
${this.hass.localize("ui.panel.config.energy.gas.gas_consumption")} ${this.hass.localize(
"ui.panel.config.energy.heating.heating_consumption"
)}
</h3> </h3>
${gasSources.map((source) => { ${gasSources.map((source) => {
const entityState = this.hass.states[source.stat_energy_from]; const entityState = this.hass.states[source.stat_energy_from];
@ -103,14 +107,14 @@ export class EnergyGasSettings extends LitElement {
> >
<ha-icon-button <ha-icon-button
.label=${this.hass.localize( .label=${this.hass.localize(
"ui.panel.config.energy.gas.edit_gas_source" "ui.panel.config.energy.heating.edit_heating_source"
)} )}
@click=${this._editSource} @click=${this._editSource}
.path=${mdiPencil} .path=${mdiPencil}
></ha-icon-button> ></ha-icon-button>
<ha-icon-button <ha-icon-button
.label=${this.hass.localize( .label=${this.hass.localize(
"ui.panel.config.energy.gas.delete_gas_source" "ui.panel.config.energy.heating.delete_heating_source"
)} )}
@click=${this._deleteSource} @click=${this._deleteSource}
.path=${mdiDelete} .path=${mdiDelete}
@ -122,7 +126,7 @@ export class EnergyGasSettings extends LitElement {
<ha-svg-icon .path=${mdiFire}></ha-svg-icon> <ha-svg-icon .path=${mdiFire}></ha-svg-icon>
<mwc-button @click=${this._addSource} <mwc-button @click=${this._addSource}
>${this.hass.localize( >${this.hass.localize(
"ui.panel.config.energy.gas.add_gas_source" "ui.panel.config.energy.heating.add_heating_source"
)}</mwc-button )}</mwc-button
> >
</div> </div>

View File

@ -96,7 +96,9 @@ export class DialogEnergyGasSettings
.path=${mdiFire} .path=${mdiFire}
style="--mdc-icon-size: 32px;" style="--mdc-icon-size: 32px;"
></ha-svg-icon> ></ha-svg-icon>
${this.hass.localize("ui.panel.config.energy.gas.dialog.header")}`} ${this.hass.localize(
"ui.panel.config.energy.heating.dialog.header"
)}`}
@closed=${this.closeDialog} @closed=${this.closeDialog}
> >
${this._error ? html`<p class="error">${this._error}</p>` : ""} ${this._error ? html`<p class="error">${this._error}</p>` : ""}
@ -110,11 +112,11 @@ export class DialogEnergyGasSettings
include-device-class="gas" include-device-class="gas"
.value=${this._source.stat_energy_from} .value=${this._source.stat_energy_from}
.label=${`${this.hass.localize( .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._params.allowedGasUnitClass === undefined
? this.hass.localize( ? this.hass.localize(
"ui.panel.config.energy.gas.dialog.m3_or_kWh" "ui.panel.config.energy.heating.dialog.m3_or_kWh"
) )
: pickableUnit : pickableUnit
})`} })`}
@ -123,12 +125,14 @@ export class DialogEnergyGasSettings
></ha-statistic-picker> ></ha-statistic-picker>
<p> <p>
${this.hass.localize(`ui.panel.config.energy.gas.dialog.cost_para`)} ${this.hass.localize(
`ui.panel.config.energy.heating.dialog.cost_para`
)}
</p> </p>
<ha-formfield <ha-formfield
.label=${this.hass.localize( .label=${this.hass.localize(
`ui.panel.config.energy.gas.dialog.no_cost` `ui.panel.config.energy.heating.dialog.no_cost`
)} )}
> >
<ha-radio <ha-radio
@ -140,7 +144,7 @@ export class DialogEnergyGasSettings
</ha-formfield> </ha-formfield>
<ha-formfield <ha-formfield
.label=${this.hass.localize( .label=${this.hass.localize(
`ui.panel.config.energy.gas.dialog.cost_stat` `ui.panel.config.energy.heating.dialog.cost_stat`
)} )}
> >
<ha-radio <ha-radio
@ -158,14 +162,14 @@ export class DialogEnergyGasSettings
statistic-types="sum" statistic-types="sum"
.value=${this._source.stat_cost} .value=${this._source.stat_cost}
.label=${this.hass.localize( .label=${this.hass.localize(
`ui.panel.config.energy.gas.dialog.cost_stat_input` `ui.panel.config.energy.heating.dialog.cost_stat_input`
)} )}
@value-changed=${this._priceStatChanged} @value-changed=${this._priceStatChanged}
></ha-statistic-picker>` ></ha-statistic-picker>`
: ""} : ""}
<ha-formfield <ha-formfield
.label=${this.hass.localize( .label=${this.hass.localize(
`ui.panel.config.energy.gas.dialog.cost_entity` `ui.panel.config.energy.heating.dialog.cost_entity`
)} )}
> >
<ha-radio <ha-radio
@ -183,7 +187,7 @@ export class DialogEnergyGasSettings
include-domains='["sensor", "input_number"]' include-domains='["sensor", "input_number"]'
.value=${this._source.entity_energy_price} .value=${this._source.entity_energy_price}
.label=${this.hass.localize( .label=${this.hass.localize(
`ui.panel.config.energy.gas.dialog.cost_entity_input`, `ui.panel.config.energy.heating.dialog.cost_entity_input`,
{ unit: this._pickedDisplayUnit || pickableUnit } { unit: this._pickedDisplayUnit || pickableUnit }
)} )}
@value-changed=${this._priceEntityChanged} @value-changed=${this._priceEntityChanged}
@ -191,7 +195,7 @@ export class DialogEnergyGasSettings
: ""} : ""}
<ha-formfield <ha-formfield
.label=${this.hass.localize( .label=${this.hass.localize(
`ui.panel.config.energy.gas.dialog.cost_number` `ui.panel.config.energy.heating.dialog.cost_number`
)} )}
> >
<ha-radio <ha-radio
@ -204,7 +208,7 @@ export class DialogEnergyGasSettings
${this._costs === "number" ${this._costs === "number"
? html`<ha-textfield ? html`<ha-textfield
.label=${this.hass.localize( .label=${this.hass.localize(
`ui.panel.config.energy.gas.dialog.cost_number_input`, `ui.panel.config.energy.heating.dialog.cost_number_input`,
{ unit: this._pickedDisplayUnit || pickableUnit } { unit: this._pickedDisplayUnit || pickableUnit }
)} )}
class="price-options" class="price-options"

View File

@ -90,7 +90,9 @@ export class EnergyStrategy {
// Only include if we have a gas source. // Only include if we have a gas source.
if (hasGas) { if (hasGas) {
view.cards!.push({ view.cards!.push({
title: hass.localize("ui.panel.energy.cards.energy_gas_graph_title"), title: hass.localize(
"ui.panel.energy.cards.energy_heating_graph_title"
),
type: "energy-gas-graph", type: "energy-gas-graph",
collection_key: "energy_dashboard", collection_key: "energy_dashboard",
}); });

View File

@ -320,7 +320,7 @@ class HuiEnergyDistrubutionCard
? html`<div class="circle-container gas"> ? html`<div class="circle-container gas">
<span class="label" <span class="label"
>${this.hass.localize( >${this.hass.localize(
"ui.panel.lovelace.cards.energy.energy_distribution.gas" "ui.panel.lovelace.cards.energy.energy_distribution.heating"
)}</span )}</span
> >
<div class="circle"> <div class="circle">

View File

@ -823,7 +823,7 @@ export class HuiEnergySourcesTableCard
<td class="mdc-data-table__cell"></td> <td class="mdc-data-table__cell"></td>
<th class="mdc-data-table__cell" scope="row"> <th class="mdc-data-table__cell" scope="row">
${this.hass.localize( ${this.hass.localize(
"ui.panel.lovelace.cards.energy.energy_sources_table.gas_total" "ui.panel.lovelace.cards.energy.energy_sources_table.heating_total"
)} )}
</th> </th>
${compare ${compare

View File

@ -1481,19 +1481,19 @@
"energy_out_of_battery": "Energy coming out of the battery (kWh)" "energy_out_of_battery": "Energy coming out of the battery (kWh)"
} }
}, },
"gas": { "heating": {
"title": "Gas Consumption", "title": "Consumption for Heating",
"sub": "Let Home Assistant monitor your gas usage.", "sub": "Let Home Assistant monitor your energy usage for heating.",
"learn_more": "More information on how to get started.", "learn_more": "More information on how to get started.",
"gas_consumption": "Gas consumption", "heating_consumption": "Heating consumption",
"edit_gas_source": "Edit gas source", "edit_heating_source": "Edit heating source",
"delete_gas_source": "Delete gas source", "delete_heating_source": "Delete heating source",
"add_gas_source": "Add gas source", "add_heating_source": "Add heating source",
"dialog": { "dialog": {
"header": "Configure gas consumption", "header": "Configure heating consumption",
"paragraph": "Gas consumption is the volume of gas that flows to your home.", "paragraph": "Heating consumption is the volume of gas or energy that you use to heat your home.",
"energy_stat": "Consumed Energy (m³)", "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", "no_cost": "Do not track costs",
"cost_stat": "Use an entity tracking the total costs", "cost_stat": "Use an entity tracking the total costs",
"cost_stat_input": "Total Costs Entity", "cost_stat_input": "Total Costs Entity",
@ -1501,7 +1501,7 @@
"cost_entity_input": "Entity with the current price per {unit}", "cost_entity_input": "Entity with the current price per {unit}",
"cost_number": "Use a static price", "cost_number": "Use a static price",
"cost_number_input": "Price per {unit}", "cost_number_input": "Price per {unit}",
"gas_usage": "Gas usage", "heating_usage": "Heating usage",
"m3_or_kWh": "ft³, m³, Wh, kWh, MWh or GJ" "m3_or_kWh": "ft³, m³, Wh, kWh, MWh or GJ"
} }
}, },
@ -1515,7 +1515,7 @@
"add_water_source": "Add water source", "add_water_source": "Add water source",
"dialog": { "dialog": {
"header": "Configure water consumption", "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)", "energy_stat": "Consumed water (m³ or gl)",
"cost_para": "Select how Home Assistant should keep track of the costs of the consumed water.", "cost_para": "Select how Home Assistant should keep track of the costs of the consumed water.",
"no_cost": "Do not track costs", "no_cost": "Do not track costs",
@ -1570,7 +1570,7 @@
}, },
"entity_unexpected_unit_gas": { "entity_unexpected_unit_gas": {
"title": "Unexpected unit of measurement", "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": { "entity_unexpected_unit_water": {
"title": "Unexpected unit of measurement", "title": "Unexpected unit of measurement",
@ -3727,7 +3727,7 @@
}, },
"energy_sources_table": { "energy_sources_table": {
"grid_total": "Grid total", "grid_total": "Grid total",
"gas_total": "Gas total", "heating_total": "Heating total",
"water_total": "Water total", "water_total": "Water total",
"source": "Source", "source": "Source",
"energy": "Energy", "energy": "Energy",
@ -3758,7 +3758,7 @@
"energy_distribution": { "energy_distribution": {
"title_today": "Energy distribution today", "title_today": "Energy distribution today",
"grid": "Grid", "grid": "Grid",
"gas": "Gas", "heating": "Heating",
"water": "Water", "water": "Water",
"solar": "Solar", "solar": "Solar",
"low_carbon": "Low-carbon", "low_carbon": "Low-carbon",
@ -4861,7 +4861,7 @@
"cards": { "cards": {
"energy_usage_graph_title": "Energy usage", "energy_usage_graph_title": "Energy usage",
"energy_solar_graph_title": "Solar production", "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_water_graph_title": "Water consumption",
"energy_distribution_title": "Energy distribution", "energy_distribution_title": "Energy distribution",
"energy_sources_table_title": "Sources", "energy_sources_table_title": "Sources",