diff --git a/src/panels/config/energy/components/ha-energy-battery-settings.ts b/src/panels/config/energy/components/ha-energy-battery-settings.ts index a6c96d4a7d..5a3c688e10 100644 --- a/src/panels/config/energy/components/ha-energy-battery-settings.ts +++ b/src/panels/config/energy/components/ha-energy-battery-settings.ts @@ -78,7 +78,11 @@ export class EnergyBatterySettings extends LitElement { ` )} -

Battery systems

+

+ ${this.hass.localize( + "ui.panel.config.energy.battery.battery_systems" + )} +

${batterySources.map((source) => { const fromEntityState = this.hass.states[source.stat_energy_from]; const toEntityState = this.hass.states[source.stat_energy_to]; @@ -113,7 +117,9 @@ export class EnergyBatterySettings extends LitElement {
Add battery system${this.hass.localize( + "ui.panel.config.energy.battery.add_battery_system" + )}
@@ -154,7 +160,7 @@ export class EnergyBatterySettings extends LitElement { if ( !(await showConfirmationDialog(this, { - title: "Are you sure you want to delete this source?", + title: this.hass.localize("ui.panel.config.energy.delete_source"), })) ) { return; diff --git a/src/panels/config/energy/components/ha-energy-device-settings.ts b/src/panels/config/energy/components/ha-energy-device-settings.ts index ad277fd0e4..eae9906b36 100644 --- a/src/panels/config/energy/components/ha-energy-device-settings.ts +++ b/src/panels/config/energy/components/ha-energy-device-settings.ts @@ -69,7 +69,11 @@ export class EnergyDeviceSettings extends LitElement { > ` )} -

Devices

+

+ ${this.hass.localize( + "ui.panel.config.energy.device_consumption.devices" + )} +

${this.preferences.device_consumption.map((device) => { const entityState = this.hass.states[device.stat_consumption]; return html` @@ -88,7 +92,11 @@ export class EnergyDeviceSettings extends LitElement { })}
- Add device + ${this.hass.localize( + "ui.panel.config.energy.device_consumption.add_device" + )}
@@ -113,7 +121,7 @@ export class EnergyDeviceSettings extends LitElement { if ( !(await showConfirmationDialog(this, { - title: "Are you sure you want to delete this device?", + title: this.hass.localize("ui.panel.config.energy.delete_source"), })) ) { return; 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 9a92798b2b..13ff04c2a7 100644 --- a/src/panels/config/energy/components/ha-energy-gas-settings.ts +++ b/src/panels/config/energy/components/ha-energy-gas-settings.ts @@ -75,7 +75,9 @@ export class EnergyGasSettings extends LitElement { > ` )} -

Gas consumption

+

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

${gasSources.map((source) => { const entityState = this.hass.states[source.stat_energy_from]; return html` @@ -101,7 +103,11 @@ export class EnergyGasSettings extends LitElement { })}
- Add gas source + ${this.hass.localize( + "ui.panel.config.energy.gas.add_gas_source" + )}
@@ -143,7 +149,7 @@ export class EnergyGasSettings extends LitElement { if ( !(await showConfirmationDialog(this, { - title: "Are you sure you want to delete this source?", + title: this.hass.localize("ui.panel.config.energy.delete_source"), })) ) { return; diff --git a/src/panels/config/energy/components/ha-energy-grid-settings.ts b/src/panels/config/energy/components/ha-energy-grid-settings.ts index 6f31cd8394..652a7e01f2 100644 --- a/src/panels/config/energy/components/ha-energy-grid-settings.ts +++ b/src/panels/config/energy/components/ha-energy-grid-settings.ts @@ -109,7 +109,11 @@ export class EnergyGridSettings extends LitElement { ` : ""} -

Grid consumption

+

+ ${this.hass.localize( + "ui.panel.config.energy.grid.grid_consumption" + )} +

${gridSource.flow_from.map((flow) => { const entityState = this.hass.states[flow.stat_energy_from]; return html` @@ -138,11 +142,15 @@ export class EnergyGridSettings extends LitElement {
Add consumption${this.hass.localize( + "ui.panel.config.energy.grid.add_consumption" + )}
-

Return to grid

+

+ ${this.hass.localize("ui.panel.config.energy.grid.return_to_grid")} +

${gridSource.flow_to.map((flow) => { const entityState = this.hass.states[flow.stat_energy_to]; return html` @@ -170,10 +178,18 @@ export class EnergyGridSettings extends LitElement { })}
- Add return + ${this.hass.localize( + "ui.panel.config.energy.grid.add_return" + )}
-

Grid carbon footprint

+

+ ${this.hass.localize( + "ui.panel.config.energy.grid.grid_carbon_footprint" + )} +

${this._configEntries?.map( (entry) => html`
- Add CO2 signal integration + ${this.hass.localize( + "ui.panel.config.energy.grid.add_co2_signal" + )}
` @@ -236,8 +254,7 @@ export class EnergyGridSettings extends LitElement { const entryId = ev.currentTarget.closest(".row").entry.entry_id; if ( !(await showConfirmationDialog(this, { - title: - "Are you sure you want to delete this integration? It will remove the entities it provides", + title: this.hass.localize("ui.panel.config.energy.delete_integration"), })) ) { return; @@ -374,7 +391,7 @@ export class EnergyGridSettings extends LitElement { if ( !(await showConfirmationDialog(this, { - title: "Are you sure you want to delete this source?", + title: this.hass.localize("ui.panel.config.energy.delete_source"), })) ) { return; @@ -404,7 +421,7 @@ export class EnergyGridSettings extends LitElement { if ( !(await showConfirmationDialog(this, { - title: "Are you sure you want to delete this source?", + title: this.hass.localize("ui.panel.config.energy.delete_source"), })) ) { return; diff --git a/src/panels/config/energy/components/ha-energy-solar-settings.ts b/src/panels/config/energy/components/ha-energy-solar-settings.ts index eaec9ded9a..9f1bbd3712 100644 --- a/src/panels/config/energy/components/ha-energy-solar-settings.ts +++ b/src/panels/config/energy/components/ha-energy-solar-settings.ts @@ -81,7 +81,11 @@ export class EnergySolarSettings extends LitElement { ` )} -

Solar production

+

+ ${this.hass.localize( + "ui.panel.config.energy.solar.solar_production" + )} +

${solarSources.map((source) => { const entityState = this.hass.states[source.stat_energy_from]; return html` @@ -114,7 +118,9 @@ export class EnergySolarSettings extends LitElement {
- Add solar production + ${this.hass.localize( + "ui.panel.config.energy.solar.add_solar_production" + )}
` @@ -159,7 +165,7 @@ export class EnergySolarSettings extends LitElement { if ( !(await showConfirmationDialog(this, { - title: "Are you sure you want to delete this source?", + title: this.hass.localize("ui.panel.config.energy.delete_source"), })) ) { return; diff --git a/src/panels/config/energy/dialogs/dialog-energy-battery-settings.ts b/src/panels/config/energy/dialogs/dialog-energy-battery-settings.ts index 61f4841168..12ad6a67cc 100644 --- a/src/panels/config/energy/dialogs/dialog-energy-battery-settings.ts +++ b/src/panels/config/energy/dialogs/dialog-energy-battery-settings.ts @@ -58,7 +58,9 @@ export class DialogEnergyBatterySettings .path=${mdiBatteryHigh} style="--mdc-icon-size: 32px;" > - Configure battery system`} + ${this.hass.localize( + "ui.panel.config.energy.battery.dialog.header" + )}`} @closed=${this.closeDialog} > ${this._error ? html`

${this._error}

` : ""} @@ -68,7 +70,9 @@ export class DialogEnergyBatterySettings .includeUnitOfMeasurement=${energyUnits} .includeDeviceClasses=${energyDeviceClasses} .value=${this._source.stat_energy_to} - .label=${`Energy going in to the battery (kWh)`} + .label=${this.hass.localize( + "ui.panel.config.energy.battery.dialog.energy_into_battery" + )} entities-only @value-changed=${this._statisticToChanged} > @@ -78,7 +82,9 @@ export class DialogEnergyBatterySettings .includeUnitOfMeasurement=${energyUnits} .includeDeviceClasses=${energyDeviceClasses} .value=${this._source.stat_energy_from} - .label=${`Energy coming out of the battery (kWh)`} + .label=${this.hass.localize( + "ui.panel.config.energy.battery.dialog.energy_out_of_battery" + )} entities-only @value-changed=${this._statisticFromChanged} > diff --git a/src/panels/config/energy/dialogs/dialog-energy-device-settings.ts b/src/panels/config/energy/dialogs/dialog-energy-device-settings.ts index 758874ff42..4a7002a8e3 100644 --- a/src/panels/config/energy/dialogs/dialog-energy-device-settings.ts +++ b/src/panels/config/energy/dialogs/dialog-energy-device-settings.ts @@ -55,7 +55,9 @@ export class DialogEnergyDeviceSettings .path=${mdiDevices} style="--mdc-icon-size: 32px;" > - Add a device`} + ${this.hass.localize( + "ui.panel.config.energy.device_consumption.dialog.header" + )}`} @closed=${this.closeDialog} > ${this._error ? html`

${this._error}

` : ""} @@ -69,7 +71,9 @@ export class DialogEnergyDeviceSettings .hass=${this.hass} .includeUnitOfMeasurement=${energyUnits} .includeDeviceClasses=${energyDeviceClasses} - .label=${`Device consumption energy (kWh)`} + .label=${this.hass.localize( + "ui.panel.config.energy.device_consumption.dialog.device_consumption_energy" + )} entities-only @value-changed=${this._statisticChanged} > 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 595ec1c942..e4a4bf98ce 100644 --- a/src/panels/config/energy/dialogs/dialog-energy-gas-settings.ts +++ b/src/panels/config/energy/dialogs/dialog-energy-gas-settings.ts @@ -82,7 +82,7 @@ export class DialogEnergyGasSettings .path=${mdiFire} style="--mdc-icon-size: 32px;" > - Configure Gas consumption`} + ${this.hass.localize("ui.panel.config.energy.gas.dialog.header")}`} @closed=${this.closeDialog} > ${this._error ? html`

${this._error}

` : ""} @@ -95,9 +95,13 @@ export class DialogEnergyGasSettings ? ENERGY_GAS_ENERGY_UNITS : ENERGY_GAS_VOLUME_UNITS} .value=${this._source.stat_energy_from} - .label=${`Gas usage (${ + .label=${`${this.hass.localize( + "ui.panel.config.energy.gas.dialog.gas_usage" + )} (${ this._params.unit === undefined - ? "m³ or kWh" + ? this.hass.localize( + "ui.panel.config.energy.gas.dialog.m3_or_kWh" + ) : this._params.unit === "energy" ? "kWh" : "m³" diff --git a/src/panels/config/energy/dialogs/dialog-energy-solar-settings.ts b/src/panels/config/energy/dialogs/dialog-energy-solar-settings.ts index d4cdd03676..bcb5786097 100644 --- a/src/panels/config/energy/dialogs/dialog-energy-solar-settings.ts +++ b/src/panels/config/energy/dialogs/dialog-energy-solar-settings.ts @@ -72,7 +72,7 @@ export class DialogEnergySolarSettings .path=${mdiSolarPower} style="--mdc-icon-size: 32px;" > - Configure solar panels`} + ${this.hass.localize("ui.panel.config.energy.solar.dialog.header")}`} @closed=${this.closeDialog} > ${this._error ? html`

${this._error}

` : ""} @@ -82,18 +82,29 @@ export class DialogEnergySolarSettings .includeUnitOfMeasurement=${energyUnits} .includeDeviceClasses=${energyDeviceClasses} .value=${this._source.stat_energy_from} - .label=${`Solar production energy (kWh)`} + .label=${this.hass.localize( + "ui.panel.config.energy.solar.dialog.solar_production_energy" + )} entities-only @value-changed=${this._statisticChanged} > -

Solar production forecast

+

+ ${this.hass.localize( + "ui.panel.config.energy.solar.dialog.solar_production_forecast" + )} +

- Adding solar production forecast information will allow you to quickly - see your expected production for today. + ${this.hass.localize( + "ui.panel.config.energy.solar.dialog.solar_production_forecast_description" + )}

- + - + ` )} - Add forecast + ${this.hass.localize( + "ui.panel.config.energy.solar.dialog.add_forecast" + )} ` : ""} diff --git a/src/panels/config/energy/ha-config-energy.ts b/src/panels/config/energy/ha-config-energy.ts index e9c21120c8..83e1ef20e2 100644 --- a/src/panels/config/energy/ha-config-energy.ts +++ b/src/panels/config/energy/ha-config-energy.ts @@ -79,8 +79,7 @@ class HaConfigEnergy extends LitElement { .tabs=${configSections.experiences} > - After setting up a new device, it can take up to 2 hours for new data - to arrive in your energy dashboard. + ${this.hass.localize("ui.panel.config.energy.new_device_info")}
- This card indicates how much of the energy consumed by your - home was generated using non-fossil fuels like solar, wind and - nuclear. The higher, the better! + ${this.hass.localize( + "ui.panel.lovelace.cards.energy.carbon_consumed_gauge.card_indicates_energy_used" + )} -
Non-fossil energy consumed
+
+ ${this.hass.localize( + "ui.panel.lovelace.cards.energy.carbon_consumed_gauge.non_fossil_energy_consumed" + )} +
` - : html`Consumed non-fossil energy couldn't be calculated`} + : html`${this.hass.localize( + "ui.panel.lovelace.cards.energy.carbon_consumed_gauge.non_fossil_energy_not_calculated" + )}`} `; } diff --git a/src/panels/lovelace/cards/energy/hui-energy-devices-graph-card.ts b/src/panels/lovelace/cards/energy/hui-energy-devices-graph-card.ts index 5d24f900d5..5006808340 100644 --- a/src/panels/lovelace/cards/energy/hui-energy-devices-graph-card.ts +++ b/src/panels/lovelace/cards/energy/hui-energy-devices-graph-card.ts @@ -170,7 +170,9 @@ export class HuiEnergyDevicesGraphCard const datasets: ChartDataset<"bar", ParsedDataType<"bar">[]>[] = [ { - label: "Energy usage", + label: this.hass.localize( + "ui.panel.lovelace.cards.energy.energy_devices_graph.energy_usage" + ), borderColor, backgroundColor, data, diff --git a/src/panels/lovelace/cards/energy/hui-energy-distribution-card.ts b/src/panels/lovelace/cards/energy/hui-energy-distribution-card.ts index 3a71b8d80b..83835855b6 100644 --- a/src/panels/lovelace/cards/energy/hui-energy-distribution-card.ts +++ b/src/panels/lovelace/cards/energy/hui-energy-distribution-card.ts @@ -70,7 +70,9 @@ class HuiEnergyDistrubutionCard } if (!this._data) { - return html`Loading…`; + return html`${this.hass.localize( + "ui.panel.lovelace.cards.energy.loading" + )}`; } const prefs = this._data.prefs; @@ -267,7 +269,11 @@ class HuiEnergyDistrubutionCard ${lowCarbonEnergy === undefined ? html`
` : html`
` @@ -659,7 +685,11 @@ class HuiEnergyDistrubutionCard ? html`
Go to the energy dashboard + ${this.hass.localize( + "ui.panel.lovelace.cards.energy.energy_distribution.go_to_energy_dashboard" + )} +
` diff --git a/src/panels/lovelace/cards/energy/hui-energy-gas-graph-card.ts b/src/panels/lovelace/cards/energy/hui-energy-gas-graph-card.ts index 4175f55bee..b9516234c0 100644 --- a/src/panels/lovelace/cards/energy/hui-energy-gas-graph-card.ts +++ b/src/panels/lovelace/cards/energy/hui-energy-gas-graph-card.ts @@ -110,8 +110,10 @@ export class HuiEnergyGasGraphCard ${!this._chartData.datasets.length ? html`
${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."} + ? this.hass.localize("ui.panel.lovelace.cards.energy.no_data") + : this.hass.localize( + "ui.panel.lovelace.cards.energy.no_data_period" + )}
` : ""} diff --git a/src/panels/lovelace/cards/energy/hui-energy-grid-neutrality-gauge-card.ts b/src/panels/lovelace/cards/energy/hui-energy-grid-neutrality-gauge-card.ts index 1f7e9d3f94..2a900769a9 100644 --- a/src/panels/lovelace/cards/energy/hui-energy-grid-neutrality-gauge-card.ts +++ b/src/panels/lovelace/cards/energy/hui-energy-grid-neutrality-gauge-card.ts @@ -61,7 +61,9 @@ class HuiEnergyGridGaugeCard } if (!this._data) { - return html`Loading...`; + return html`${this.hass.localize( + "ui.panel.lovelace.cards.energy.loading" + )}`; } const prefs = this._data.prefs; @@ -102,11 +104,13 @@ class HuiEnergyGridGaugeCard - This card represents your energy dependency. + ${this.hass.localize( + "ui.panel.lovelace.cards.energy.grid_neutrality_gauge.energy_dependency" + )}

- If it's green, it means you produced more energy than that you - consumed from the grid. If it's in the red, it means that you - relied on the grid for part of your home's energy consumption. + ${this.hass.localize( + "ui.panel.lovelace.cards.energy.grid_neutrality_gauge.red_green_color_explain" + )}
@@ -126,11 +130,17 @@ class HuiEnergyGridGaugeCard >
${returnedToGrid! >= consumedFromGrid! - ? "Net returned to the grid" - : "Net consumed from the grid"} + ? this.hass.localize( + "ui.panel.lovelace.cards.energy.grid_neutrality_gauge.net_returned_grid" + ) + : this.hass.localize( + "ui.panel.lovelace.cards.energy.grid_neutrality_gauge.net_consumed_grid" + )}
` - : "Grid neutrality could not be calculated"} + : this.hass.localize( + "ui.panel.lovelace.cards.energy.grid_neutrality_gauge.grid_neutrality_not_calculated" + )} `; } diff --git a/src/panels/lovelace/cards/energy/hui-energy-solar-consumed-gauge-card.ts b/src/panels/lovelace/cards/energy/hui-energy-solar-consumed-gauge-card.ts index 6f54631658..578ae00fd5 100644 --- a/src/panels/lovelace/cards/energy/hui-energy-solar-consumed-gauge-card.ts +++ b/src/panels/lovelace/cards/energy/hui-energy-solar-consumed-gauge-card.ts @@ -54,7 +54,9 @@ class HuiEnergySolarGaugeCard } if (!this._data) { - return html`Loading...`; + return html`${this.hass.localize( + "ui.panel.lovelace.cards.energy.loading" + )}`; } const prefs = this._data.prefs; @@ -91,13 +93,13 @@ class HuiEnergySolarGaugeCard - This card indicates how much of the solar energy you produced - was used by your home instead of being returned to the grid. + ${this.hass.localize( + "ui.panel.lovelace.cards.energy.solar_consumed_gauge.card_indicates_solar_energy_used" + )}

- If this number is typically very low, indicating excess solar - production, you might want to consider charging a home battery - or electric car from your solar panels at times of high solar - production. + ${this.hass.localize( + "ui.panel.lovelace.cards.energy.solar_consumed_gauge.card_indicates_solar_energy_used_charge_home_bat" + )}
-
Self-consumed solar energy
+
+ ${this.hass.localize( + "ui.panel.lovelace.cards.energy.solar_consumed_gauge.self_consumed_solar_energy" + )} +
` : totalSolarProduction === 0 - ? "You have not produced any solar energy" - : "Self-consumed solar energy couldn't be calculated"} + ? this.hass.localize( + "ui.panel.lovelace.cards.energy.solar_consumed_gauge.not_produced_solar_energy" + ) + : this.hass.localize( + "ui.panel.lovelace.cards.energy.solar_consumed_gauge.self_consumed_solar_could_not_calc" + )} `; } diff --git a/src/panels/lovelace/cards/energy/hui-energy-solar-graph-card.ts b/src/panels/lovelace/cards/energy/hui-energy-solar-graph-card.ts index fb595bf124..fc5ace1bf8 100644 --- a/src/panels/lovelace/cards/energy/hui-energy-solar-graph-card.ts +++ b/src/panels/lovelace/cards/energy/hui-energy-solar-graph-card.ts @@ -108,8 +108,10 @@ export class HuiEnergySolarGraphCard ${!this._chartData.datasets.length ? html`
${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."} + ? this.hass.localize("ui.panel.lovelace.cards.energy.no_data") + : this.hass.localize( + "ui.panel.lovelace.cards.energy.no_data_period" + )}
` : ""} @@ -306,9 +308,12 @@ export class HuiEnergySolarGraphCard if (solarProductionData.length) { data.push({ - label: `Production ${ - entity ? computeStateName(entity) : source.stat_energy_from - }`, + label: this.hass.localize( + "ui.panel.lovelace.cards.energy.energy_solar_graph.production", + { + name: entity ? computeStateName(entity) : source.stat_energy_from, + } + ), borderColor, backgroundColor: borderColor + "7F", data: solarProductionData, @@ -361,9 +366,14 @@ export class HuiEnergySolarGraphCard if (solarForecastData.length) { data.push({ type: "line", - label: `Forecast ${ - entity ? computeStateName(entity) : source.stat_energy_from - }`, + label: this.hass.localize( + "ui.panel.lovelace.cards.energy.energy_solar_graph.forecast", + { + name: entity + ? computeStateName(entity) + : source.stat_energy_from, + } + ), fill: false, stepped: false, borderColor: computedStyles.getPropertyValue( 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 e91ecd9fee..bd6a0f3756 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 @@ -69,7 +69,9 @@ export class HuiEnergySourcesTableCard } if (!this._data) { - return html`Loading...`; + return html`${this.hass.localize( + "ui.panel.lovelace.cards.energy.loading" + )}`; } let totalGrid = 0; @@ -134,14 +136,18 @@ export class HuiEnergySourcesTableCard role="columnheader" scope="col" > - Source + ${this.hass.localize( + "ui.panel.lovelace.cards.energy.energy_sources_table.source" + )} - Energy + ${this.hass.localize( + "ui.panel.lovelace.cards.energy.energy_sources_table.energy" + )} ${showCosts ? html` - Cost + ${this.hass.localize( + "ui.panel.lovelace.cards.energy.energy_sources_table.cost" + )} ` : ""} @@ -290,7 +298,9 @@ export class HuiEnergySourcesTableCard ? html` - Battery total + ${this.hass.localize( + "ui.panel.lovelace.cards.energy.energy_sources_table.battery_total" + )} - Grid total + + ${this.hass.localize( + "ui.panel.lovelace.cards.energy.energy_sources_table.grid_total" + )} + @@ -524,7 +538,9 @@ export class HuiEnergySourcesTableCard ? html` - Total costs + ${this.hass.localize( + "ui.panel.lovelace.cards.energy.energy_sources_table.total_costs" + )} dataset.data.length) ? html`
${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."} + ? this.hass.localize("ui.panel.lovelace.cards.energy.no_data") + : this.hass.localize( + "ui.panel.lovelace.cards.energy.no_data_period" + )}
` : ""} @@ -204,16 +206,16 @@ export class HuiEnergyUsageGraphCard } return [ totalConsumed - ? `Total consumed: ${formatNumber( - totalConsumed, - locale - )} kWh` + ? this.hass.localize( + "ui.panel.lovelace.cards.energy.energy_usage_graph.total_consumed", + { num: formatNumber(totalConsumed, locale) } + ) : "", totalReturned - ? `Total returned: ${formatNumber( - totalReturned, - locale - )} kWh` + ? this.hass.localize( + "ui.panel.lovelace.cards.energyenergy_usage_graph.total_returned", + { num: formatNumber(totalReturned, locale) } + ) : "", ].filter(Boolean); }, @@ -344,9 +346,15 @@ export class HuiEnergyUsageGraphCard .trim(), }; const labels = { - used_grid: "Combined from grid", - used_solar: "Consumed solar", - used_battery: "Consumed battery", + used_grid: this.hass.localize( + "ui.panel.lovelace.cards.energy.energy_usage_graph.combined_from_grid" + ), + used_solar: this.hass.localize( + "ui.panel.lovelace.cards.energy.energy_usage_graph.consumed_solar" + ), + used_battery: this.hass.localize( + "ui.panel.lovelace.cards.energy.energy_usage_graph.consumed_battery" + ), }; const backgroundColor = computedStyles diff --git a/src/panels/lovelace/components/hui-energy-period-selector.ts b/src/panels/lovelace/components/hui-energy-period-selector.ts index d2515d7dd9..95bdb8a060 100644 --- a/src/panels/lovelace/components/hui-energy-period-selector.ts +++ b/src/panels/lovelace/components/hui-energy-period-selector.ts @@ -35,13 +35,6 @@ import "@material/mwc-button/mwc-button"; import "../../../components/ha-button-toggle-group"; import { toggleAttribute } from "../../../common/dom/toggle_attribute"; -const viewButtons: ToggleButton[] = [ - { label: "Day", value: "day" }, - { label: "Week", value: "week" }, - { label: "Month", value: "month" }, - { label: "Year", value: "year" }, -]; - @customElement("hui-energy-period-selector") export class HuiEnergyPeriodSelector extends SubscribeMixin(LitElement) { @property({ attribute: false }) public hass!: HomeAssistant; @@ -72,6 +65,33 @@ export class HuiEnergyPeriodSelector extends SubscribeMixin(LitElement) { return html``; } + const viewButtons: ToggleButton[] = [ + { + label: this.hass.localize( + "ui.panel.lovelace.components.energy_period_selector.day" + ), + value: "day", + }, + { + label: this.hass.localize( + "ui.panel.lovelace.components.energy_period_selector.week" + ), + value: "week", + }, + { + label: this.hass.localize( + "ui.panel.lovelace.components.energy_period_selector.month" + ), + value: "month", + }, + { + label: this.hass.localize( + "ui.panel.lovelace.components.energy_period_selector.year" + ), + value: "year", + }, + ]; + return html`
@@ -88,14 +108,26 @@ export class HuiEnergyPeriodSelector extends SubscribeMixin(LitElement) { this._endDate || new Date(), this.hass.locale )}`} - + - + - Today + ${this.hass.localize( + "ui.panel.lovelace.components.energy_period_selector.today" + )}
diff --git a/src/translations/en.json b/src/translations/en.json index 9755fff8ab..65c982211e 100755 --- a/src/translations/en.json +++ b/src/translations/en.json @@ -986,10 +986,19 @@ "energy": { "caption": "Energy", "description": "Monitor your energy production and consumption", + "new_device_info": "After setting up a new device, it can take up to 2 hours for new data to arrive in your energy dashboard.", + "delete_source": "Are you sure you want to delete this source?", + "delete_integration": "Are you sure you want to delete this integration? It will remove the entities it provides", "grid": { "title": "Electricity grid", "sub": "Configure the amount of energy that you consume from the grid and, if you produce energy, give back to the grid. This allows Home Assistant to track your whole home energy usage.", "learn_more": "More information on how to get started.", + "grid_consumption": "Grid consumption", + "add_consumption": "Add consumption", + "return_to_grid": "Return to grid", + "add_return": "Add return", + "grid_carbon_footprint": "Grid carbon footprint", + "add_co2_signal": "Add CO2 signal integration", "flow_dialog": { "from": { "header": "Configure grid consumption", @@ -1025,19 +1034,39 @@ "title": "Solar Panels", "sub": "Let Home Assistant monitor your solar panels and give you insight on their performance.", "learn_more": "More information on how to get started.", + "solar_production": "Solar production", + "add_solar_production": "Add solar production", "stat_production": "Your solar energy production", "stat_return_to_grid": "Solar energy returned to the grid", - "stat_predicted_production": "Prediction of your solar energy production" + "stat_predicted_production": "Prediction of your solar energy production", + "dialog": { + "header": "Configure solar panels", + "solar_production_energy": "Solar production energy (kWh)", + "solar_production_forecast": "Solar production forecast", + "solar_production_forecast_description": "Adding solar production forecast information will allow you to quickly see your expected production for today.", + "dont_forecast_production": "Don't forecast production", + "forecast_production": "Forecast Production", + "add_forecast": "Add forecast" + } }, "battery": { "title": "Home Battery Storage", "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." + "learn_more": "More information on how to get started.", + "battery_systems": "Battery systems", + "add_battery_system": "Add battery system", + "dialog": { + "header": "Configure battery system", + "energy_into_battery": "Energy going in to the battery (kWh)", + "energy_out_of_battery": "Energy coming out of the battery (kWh)" + } }, "gas": { "title": "Gas Consumption", "sub": "Let Home Assistant monitor your gas usage.", "learn_more": "More information on how to get started.", + "gas_consumption": "Gas consumption", + "add_gas_source": "Add gas source", "dialog": { "header": "Configure gas consumption", "paragraph": "Gas consumption is the volume of gas that flows to your home.", @@ -1049,7 +1078,9 @@ "cost_entity": "Use an entity with current price", "cost_entity_input": "Entity with the current price per {unit}", "cost_number": "Use a static price", - "cost_number_input": "Price per {unit}" + "cost_number_input": "Price per {unit}", + "gas_usage": "Gas usage", + "m3_or_kWh": "m³ or kWh" } }, "device_consumption": { @@ -1058,7 +1089,11 @@ "learn_more": "More information on how to get started.", "add_stat": "Pick entity to track energy of", "selected_stat": "Tracking energy for", + "devices": "Devices", + "add_device": "Add device", "dialog": { + "header": "Add a device", + "device_consumption_energy": "Device consumption energy (kWh)", "selected_stat_intro": "Select the entity that represents the device energy usage." } }, @@ -2928,6 +2963,61 @@ }, "starting": { "description": "Home Assistant is starting, please wait…" + }, + "energy": { + "loading": "Loading...", + "no_data": "There is no data to show. It can take up to 2 hours for new data to arrive after you configure your energy dashboard.", + "no_data_period": "There is no data for this period.", + "energy_usage_graph": { + "total_consumed": "Total consumed {num} kWh", + "total_returned": "Total returned {num} kWh", + "combined_from_grid": "Combined from grid", + "consumed_solar": "Consumed solar", + "consumed_battery": "Consumed battery" + }, + "energy_sources_table": { + "grid_total": "Grid total", + "source": "Source", + "energy": "Energy", + "cost": "Cost", + "battery_total": "Battery total", + "total_costs": "Total costs" + }, + "energy_solar_graph": { + "production": "Production {name}", + "forecast": "Forecast {name}" + }, + "solar_consumed_gauge": { + "card_indicates_solar_energy_used": "This card indicates how much of the solar energy you produced was used by your home instead of being returned to the grid.", + "card_indicates_solar_energy_used_charge_home_bat": "If this number is typically very low, indicating excess solar production, you might want to consider charging a home battery or electric car from your solar panels at times of high solar production.", + "self_consumed_solar_energy": "Self-consumed solar energy", + "not_produced_solar_energy": "You have not produced any solar energy", + "self_consumed_solar_could_not_calc": "Self-consumed solar energy couldn't be calculated" + }, + "grid_neutrality_gauge": { + "energy_dependency": "This card represents your energy dependency.", + "red_green_color_explain": "If it's green, it means you produced more energy than that you consumed from the grid. If it's in the red, it means that you relied on the grid for part of your home's energy consumption.", + "net_returned_grid": "Net returned to the grid", + "net_consumed_grid": "Net consumed from the grid", + "grid_neutrality_not_calculated": "Grid neutrality could not be calculated" + }, + "energy_distribution": { + "grid": "Grid", + "gas": "Gas", + "solar": "Solar", + "non_fossil": "Non-fossil", + "home": "Home", + "battery": "Battery", + "go_to_energy_dashboard": "Go to the energy dashboard" + }, + "energy_devices_graph": { + "energy_usage": "Energy usage" + }, + "carbon_consumed_gauge": { + "card_indicates_energy_used": "This card indicates how much of the energy consumed by your home was generated using non-fossil fuels like solar, wind and nuclear. The higher, the better!", + "non_fossil_energy_consumed": "Non-fossil energy consumed", + "non_fossil_energy_not_calculated": "Consumed non-fossil energy couldn't be calculated" + } } }, "unused_entities": { @@ -3362,6 +3452,15 @@ "timestamp-display": { "invalid": "Invalid timestamp", "invalid_format": "Invalid display format" + }, + "energy_period_selector": { + "today": "Today", + "day": "Day", + "week": "Week", + "month": "Month", + "year": "Year", + "previous": "Previous", + "next": "Next" } }, "reload_lovelace": "Reload UI" @@ -3823,6 +3922,14 @@ "stat_house_energy_meter": "Total energy consumption", "solar": "Solar", "by_device": "Consumption by device" + }, + "cards": { + "energy_usage_graph_title": "Energy usage", + "energy_solar_graph_title": "Solar production", + "energy_gas_graph_title": "Gas consumption", + "energy_distribution_title": "Energy distribution", + "energy_sources_table_title": "Sources", + "energy_devices_graph_title": "Monitor individual devices" } } }