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 c35276faeb..48abf3c694 100644
--- a/src/panels/config/energy/components/ha-energy-battery-settings.ts
+++ b/src/panels/config/energy/components/ha-energy-battery-settings.ts
@@ -123,9 +123,9 @@ export class EnergyBatterySettings extends LitElement {
>
@@ -184,13 +184,20 @@ export class EnergyBatterySettings extends LitElement {
});
}
- private async _deleteSource(ev) {
- const sourceToDelete: BatterySourceTypeEnergyPreference =
+ private async _removeSource(ev) {
+ const sourceToRemove: BatterySourceTypeEnergyPreference =
ev.currentTarget.closest(".row").source;
if (
!(await showConfirmationDialog(this, {
- title: this.hass.localize("ui.panel.config.energy.delete_source"),
+ title: this.hass.localize(
+ "ui.panel.config.energy.battery.remove_battery_system_title"
+ ),
+ text: this.hass.localize(
+ "ui.panel.config.energy.battery.remove_battery_system_text"
+ ),
+ confirmText: this.hass.localize("ui.common.remove"),
+ destructive: true,
}))
) {
return;
@@ -200,7 +207,7 @@ export class EnergyBatterySettings extends LitElement {
await this._savePreferences({
...this.preferences,
energy_sources: this.preferences.energy_sources.filter(
- (source) => source !== sourceToDelete
+ (source) => source !== sourceToRemove
),
});
} catch (err: any) {
diff --git a/src/panels/config/energy/components/ha-energy-device-settings-water.ts b/src/panels/config/energy/components/ha-energy-device-settings-water.ts
index 6351eb083a..ef0d8b197f 100644
--- a/src/panels/config/energy/components/ha-energy-device-settings-water.ts
+++ b/src/panels/config/energy/components/ha-energy-device-settings-water.ts
@@ -114,8 +114,8 @@ export class EnergyDeviceSettingsWater extends LitElement {
.path=${mdiPencil}
>
@@ -207,13 +207,20 @@ export class EnergyDeviceSettingsWater extends LitElement {
});
}
- private async _deleteDevice(ev) {
- const deviceToDelete: DeviceConsumptionEnergyPreference =
+ private async _removeDevice(ev) {
+ const deviceToRemove: DeviceConsumptionEnergyPreference =
ev.currentTarget.device;
if (
!(await showConfirmationDialog(this, {
- title: this.hass.localize("ui.panel.config.energy.delete_source"),
+ title: this.hass.localize(
+ "ui.panel.config.energy.device_consumption_water.remove_device_title"
+ ),
+ text: this.hass.localize(
+ "ui.panel.config.energy.device_consumption_water.remove_device_text"
+ ),
+ confirmText: this.hass.localize("ui.common.remove"),
+ destructive: true,
}))
) {
return;
@@ -224,7 +231,7 @@ export class EnergyDeviceSettingsWater extends LitElement {
...this.preferences,
device_consumption_water:
this.preferences.device_consumption_water.filter(
- (device) => device !== deviceToDelete
+ (device) => device !== deviceToRemove
),
};
this._sanitizeParents(newPrefs);
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 cbe73436cf..b476582224 100644
--- a/src/panels/config/energy/components/ha-energy-device-settings.ts
+++ b/src/panels/config/energy/components/ha-energy-device-settings.ts
@@ -114,8 +114,8 @@ export class EnergyDeviceSettings extends LitElement {
.path=${mdiPencil}
>
@@ -204,13 +204,20 @@ export class EnergyDeviceSettings extends LitElement {
});
}
- private async _deleteDevice(ev) {
- const deviceToDelete: DeviceConsumptionEnergyPreference =
+ private async _removeDevice(ev) {
+ const deviceToRemove: DeviceConsumptionEnergyPreference =
ev.currentTarget.device;
if (
!(await showConfirmationDialog(this, {
- title: this.hass.localize("ui.panel.config.energy.delete_source"),
+ title: this.hass.localize(
+ "ui.panel.config.energy.device_consumption.remove_device_title"
+ ),
+ text: this.hass.localize(
+ "ui.panel.config.energy.device_consumption.remove_device_text"
+ ),
+ confirmText: this.hass.localize("ui.common.remove"),
+ destructive: true,
}))
) {
return;
@@ -220,7 +227,7 @@ export class EnergyDeviceSettings extends LitElement {
const newPrefs = {
...this.preferences,
device_consumption: this.preferences.device_consumption.filter(
- (device) => device !== deviceToDelete
+ (device) => device !== deviceToRemove
),
};
this._sanitizeParents(newPrefs);
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 f7c38355ea..34df19f272 100644
--- a/src/panels/config/energy/components/ha-energy-gas-settings.ts
+++ b/src/panels/config/energy/components/ha-energy-gas-settings.ts
@@ -111,9 +111,9 @@ export class EnergyGasSettings extends LitElement {
>
@@ -184,13 +184,20 @@ export class EnergyGasSettings extends LitElement {
});
}
- private async _deleteSource(ev) {
- const sourceToDelete: GasSourceTypeEnergyPreference =
+ private async _removeSource(ev) {
+ const sourceToRemove: GasSourceTypeEnergyPreference =
ev.currentTarget.closest(".row").source;
if (
!(await showConfirmationDialog(this, {
- title: this.hass.localize("ui.panel.config.energy.delete_source"),
+ title: this.hass.localize(
+ "ui.panel.config.energy.gas.remove_gas_source_title"
+ ),
+ text: this.hass.localize(
+ "ui.panel.config.energy.gas.remove_gas_source_text"
+ ),
+ confirmText: this.hass.localize("ui.common.remove"),
+ destructive: true,
}))
) {
return;
@@ -200,7 +207,7 @@ export class EnergyGasSettings extends LitElement {
await this._savePreferences({
...this.preferences,
energy_sources: this.preferences.energy_sources.filter(
- (source) => source !== sourceToDelete
+ (source) => source !== sourceToRemove
),
});
} catch (err: any) {
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 e37cb6a7b4..80e1e41c9a 100644
--- a/src/panels/config/energy/components/ha-energy-grid-settings.ts
+++ b/src/panels/config/energy/components/ha-energy-grid-settings.ts
@@ -149,9 +149,9 @@ export class EnergyGridSettings extends LitElement {
>
@@ -248,7 +248,14 @@ export class EnergyGridSettings extends LitElement {
const entryId = ev.currentTarget.closest(".row").entry.entry_id;
if (
!(await showConfirmationDialog(this, {
- title: this.hass.localize("ui.panel.config.energy.delete_integration"),
+ title: this.hass.localize(
+ "ui.panel.config.energy.grid.delete_co2_signal_title"
+ ),
+ text: this.hass.localize(
+ "ui.panel.config.energy.grid.delete_co2_signal_text"
+ ),
+ confirmText: this.hass.localize("ui.common.delete"),
+ destructive: true,
}))
) {
return;
@@ -302,13 +309,20 @@ export class EnergyGridSettings extends LitElement {
});
}
- private async _deleteSource(ev) {
+ private async _removeSource(ev) {
const row = ev.currentTarget.closest(".row");
const sourceIndex: number = row.sourceIndex;
if (
!(await showConfirmationDialog(this, {
- title: this.hass.localize("ui.panel.config.energy.delete_source"),
+ title: this.hass.localize(
+ "ui.panel.config.energy.grid.remove_connection_title"
+ ),
+ text: this.hass.localize(
+ "ui.panel.config.energy.grid.remove_connection_text"
+ ),
+ confirmText: this.hass.localize("ui.common.remove"),
+ destructive: true,
}))
) {
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 710217a24c..b8b53fe0c0 100644
--- a/src/panels/config/energy/components/ha-energy-solar-settings.ts
+++ b/src/panels/config/energy/components/ha-energy-solar-settings.ts
@@ -120,9 +120,9 @@ export class EnergySolarSettings extends LitElement {
: ""}
@@ -187,13 +187,20 @@ export class EnergySolarSettings extends LitElement {
});
}
- private async _deleteSource(ev) {
- const sourceToDelete: SolarSourceTypeEnergyPreference =
+ private async _removeSource(ev) {
+ const sourceToRemove: SolarSourceTypeEnergyPreference =
ev.currentTarget.closest(".row").source;
if (
!(await showConfirmationDialog(this, {
- title: this.hass.localize("ui.panel.config.energy.delete_source"),
+ title: this.hass.localize(
+ "ui.panel.config.energy.solar.remove_solar_production_title"
+ ),
+ text: this.hass.localize(
+ "ui.panel.config.energy.solar.remove_solar_production_text"
+ ),
+ confirmText: this.hass.localize("ui.common.remove"),
+ destructive: true,
}))
) {
return;
@@ -203,7 +210,7 @@ export class EnergySolarSettings extends LitElement {
await this._savePreferences({
...this.preferences,
energy_sources: this.preferences.energy_sources.filter(
- (source) => source !== sourceToDelete
+ (source) => source !== sourceToRemove
),
});
} catch (err: any) {
diff --git a/src/panels/config/energy/components/ha-energy-water-settings.ts b/src/panels/config/energy/components/ha-energy-water-settings.ts
index 2ee7e9c453..865ad1e6ee 100644
--- a/src/panels/config/energy/components/ha-energy-water-settings.ts
+++ b/src/panels/config/energy/components/ha-energy-water-settings.ts
@@ -110,9 +110,9 @@ export class EnergyWaterSettings extends LitElement {
>
@@ -173,13 +173,20 @@ export class EnergyWaterSettings extends LitElement {
});
}
- private async _deleteSource(ev) {
- const sourceToDelete: WaterSourceTypeEnergyPreference =
+ private async _removeSource(ev) {
+ const sourceToRemove: WaterSourceTypeEnergyPreference =
ev.currentTarget.closest(".row").source;
if (
!(await showConfirmationDialog(this, {
- title: this.hass.localize("ui.panel.config.energy.delete_source"),
+ title: this.hass.localize(
+ "ui.panel.config.energy.water.remove_water_source_title"
+ ),
+ text: this.hass.localize(
+ "ui.panel.config.energy.water.remove_water_source_text"
+ ),
+ confirmText: this.hass.localize("ui.common.remove"),
+ destructive: true,
}))
) {
return;
@@ -189,7 +196,7 @@ export class EnergyWaterSettings extends LitElement {
await this._savePreferences({
...this.preferences,
energy_sources: this.preferences.energy_sources.filter(
- (source) => source !== sourceToDelete
+ (source) => source !== sourceToRemove
),
});
} catch (err: any) {
diff --git a/src/translations/en.json b/src/translations/en.json
index 34b0afea9b..72e15fb957 100644
--- a/src/translations/en.json
+++ b/src/translations/en.json
@@ -3862,10 +3862,14 @@
"grid_connections": "Grid connections",
"add_connection": "Add grid connection",
"edit_connection": "Edit grid connection",
- "delete_connection": "Delete grid connection",
+ "remove_connection": "Remove grid connection",
"grid_carbon_footprint": "Grid carbon footprint",
"remove_co2_signal": "Remove Electricity Maps integration",
"add_co2_signal": "Add Electricity Maps integration",
+ "delete_co2_signal_title": "Delete Electricity Maps integration",
+ "delete_co2_signal_text": "This will delete the integration and all entities it provides.",
+ "remove_connection_title": "Remove grid connection",
+ "remove_connection_text": "This will remove the grid connection from your energy configuration.",
"dialog": {
"header": "Configure grid connection",
"energy": "Energy",
@@ -3922,8 +3926,10 @@
"learn_more": "More information on how to get started",
"solar_production": "Solar production",
"edit_solar_production": "Edit solar production",
- "delete_solar_production": "Remove solar production",
+ "remove_solar_production": "Remove solar production",
"add_solar_production": "Add solar production",
+ "remove_solar_production_title": "Remove solar production",
+ "remove_solar_production_text": "This will remove the solar production source from your energy configuration.",
"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",
@@ -3945,8 +3951,10 @@
"learn_more": "More information on how to get started",
"battery_systems": "Battery systems",
"edit_battery_system": "Edit battery system",
- "delete_battery_system": "Remove battery system",
+ "remove_battery_system": "Remove battery system",
"add_battery_system": "Add battery system",
+ "remove_battery_system_title": "Remove battery system",
+ "remove_battery_system_text": "This will remove the battery system from your energy configuration.",
"dialog": {
"header": "Configure battery system",
"energy_helper_into": "Pick a sensor that measures the electricity flowing into the battery in either of {unit}.",
@@ -3972,8 +3980,10 @@
"learn_more": "More information on how to get started",
"gas_consumption": "Gas consumption",
"edit_gas_source": "Edit gas source",
- "delete_gas_source": "Remove gas source",
+ "remove_gas_source": "Remove gas source",
"add_gas_source": "Add gas source",
+ "remove_gas_source_title": "Remove gas source",
+ "remove_gas_source_text": "This will remove the gas source from your energy configuration.",
"dialog": {
"header": "Configure gas consumption",
"paragraph": "Gas consumption is measured either as the volume of gas that flows to your home or as the amount of energy contained in the gas.",
@@ -4001,8 +4011,10 @@
"learn_more": "More information on how to get started",
"water_consumption": "Water consumption",
"edit_water_source": "Edit water source",
- "delete_water_source": "Remove water source",
+ "remove_water_source": "Remove water source",
"add_water_source": "Add water source",
+ "remove_water_source_title": "Remove water source",
+ "remove_water_source_text": "This will remove the water source from your energy configuration.",
"dialog": {
"header": "Configure water consumption",
"paragraph": "Water consumption is the volume of water that flows to your home.",
@@ -4029,6 +4041,8 @@
"selected_stat": "Tracking energy for",
"devices": "Devices",
"add_device": "Add device",
+ "remove_device_title": "Remove device",
+ "remove_device_text": "This will remove the device from your energy configuration.",
"dialog": {
"header": "Add a device",
"display_name": "Display name",
@@ -4046,6 +4060,8 @@
"learn_more": "More information on how to get started",
"devices": "Devices",
"add_device": "Add device",
+ "remove_device_title": "Remove water device",
+ "remove_device_text": "This will remove the water device from your energy configuration.",
"dialog": {
"header": "Add a water device",
"display_name": "Display name",