Skip to content

Commit

Permalink
Add missing labels in energy dashboard settings (#12722)
Browse files Browse the repository at this point in the history
Signed-off-by: Patrick ZAJDA <patrick@zajda.fr>
  • Loading branch information
Nardol committed May 18, 2022
1 parent 5fb1504 commit d32f84f
Show file tree
Hide file tree
Showing 5 changed files with 44 additions and 0 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -107,10 +107,16 @@ export class EnergyBatterySettings extends LitElement {
>
</div>
<ha-icon-button
.label=${this.hass.localize(
"ui.panel.config.energy.battery.edit_battery_system"
)}
@click=${this._editSource}
.path=${mdiPencil}
></ha-icon-button>
<ha-icon-button
.label=${this.hass.localize(
"ui.panel.config.energy.battery.delete_battery_system"
)}
@click=${this._deleteSource}
.path=${mdiDelete}
></ha-icon-button>
Expand Down
6 changes: 6 additions & 0 deletions src/panels/config/energy/components/ha-energy-gas-settings.ts
Original file line number Diff line number Diff line change
Expand Up @@ -94,10 +94,16 @@ export class EnergyGasSettings extends LitElement {
: source.stat_energy_from}</span
>
<ha-icon-button
.label=${this.hass.localize(
"ui.panel.config.energy.gas.edit_gas_source"
)}
@click=${this._editSource}
.path=${mdiPencil}
></ha-icon-button>
<ha-icon-button
.label=${this.hass.localize(
"ui.panel.config.energy.gas.delete_gas_source"
)}
@click=${this._deleteSource}
.path=${mdiDelete}
></ha-icon-button>
Expand Down
15 changes: 15 additions & 0 deletions src/panels/config/energy/components/ha-energy-grid-settings.ts
Original file line number Diff line number Diff line change
Expand Up @@ -132,10 +132,16 @@ export class EnergyGridSettings extends LitElement {
: flow.stat_energy_from}</span
>
<ha-icon-button
.label=${this.hass.localize(
"ui.panel.config.energy.grid.edit_consumption"
)}
@click=${this._editFromSource}
.path=${mdiPencil}
></ha-icon-button>
<ha-icon-button
.label=${this.hass.localize(
"ui.panel.config.energy.grid.delete_consumption"
)}
@click=${this._deleteFromSource}
.path=${mdiDelete}
></ha-icon-button>
Expand Down Expand Up @@ -171,10 +177,16 @@ export class EnergyGridSettings extends LitElement {
: flow.stat_energy_to}</span
>
<ha-icon-button
.label=${this.hass.localize(
"ui.panel.config.energy.grid.edit_return"
)}
@click=${this._editToSource}
.path=${mdiPencil}
></ha-icon-button>
<ha-icon-button
.label=${this.hass.localize(
"ui.panel.config.energy.grid.delete_return"
)}
@click=${this._deleteToSource}
.path=${mdiDelete}
></ha-icon-button>
Expand Down Expand Up @@ -212,6 +224,9 @@ export class EnergyGridSettings extends LitElement {
<ha-icon-button .path=${mdiPencil}></ha-icon-button>
</a>
<ha-icon-button
.label=${this.hass.localize(
"ui.panel.config.energy.grid.remove_co2_signal"
)}
@click=${this._removeCO2Sensor}
.path=${mdiDelete}
></ha-icon-button>
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -104,12 +104,18 @@ export class EnergySolarSettings extends LitElement {
${this.info
? html`
<ha-icon-button
.label=${this.hass.localize(
"ui.panel.config.energy.solar.edit_solar_production"
)}
@click=${this._editSource}
.path=${mdiPencil}
></ha-icon-button>
`
: ""}
<ha-icon-button
.label=${this.hass.localize(
"ui.panel.config.energy.solar.delete_solar_production"
)}
@click=${this._deleteSource}
.path=${mdiDelete}
></ha-icon-button>
Expand Down
11 changes: 11 additions & 0 deletions src/translations/en.json
Original file line number Diff line number Diff line change
Expand Up @@ -1308,10 +1308,15 @@
"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",
"edit_consumption": "Edit consumption",
"delete_consumption": "Delete consumption",
"add_consumption": "Add consumption",
"return_to_grid": "Return to grid",
"edit_return": "Edit return",
"delete_return": "Delete return",
"add_return": "Add return",
"grid_carbon_footprint": "Grid carbon footprint",
"remove_co2_signal": "Remove CO2 signal integration",
"add_co2_signal": "Add CO2 signal integration",
"flow_dialog": {
"from": {
Expand Down Expand Up @@ -1349,6 +1354,8 @@
"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",
"edit_solar_production": "Edit solar production",
"delete_solar_production": "Delete solar production",
"add_solar_production": "Add solar production",
"stat_production": "Your solar energy production",
"stat_return_to_grid": "Solar energy returned to the grid",
Expand All @@ -1368,6 +1375,8 @@
"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.",
"battery_systems": "Battery systems",
"edit_battery_system": "Edit battery system",
"delete_battery_system": "Delete battery system",
"add_battery_system": "Add battery system",
"dialog": {
"header": "Configure battery system",
Expand All @@ -1380,6 +1389,8 @@
"sub": "Let Home Assistant monitor your gas usage.",
"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",
"dialog": {
"header": "Configure gas consumption",
Expand Down

0 comments on commit d32f84f

Please sign in to comment.