diff --git a/homeassistant/components/wallbox/const.py b/homeassistant/components/wallbox/const.py index dfa7fd5a4c1..d978e1ec7c9 100644 --- a/homeassistant/components/wallbox/const.py +++ b/homeassistant/components/wallbox/const.py @@ -11,6 +11,8 @@ CODE_KEY = "code" CONF_STATION = "station" CHARGER_ADDED_DISCHARGED_ENERGY_KEY = "added_discharged_energy" CHARGER_ADDED_ENERGY_KEY = "added_energy" +CHARGER_ADDED_GREEN_ENERGY_KEY = "added_green_energy" +CHARGER_ADDED_GRID_ENERGY_KEY = "added_grid_energy" CHARGER_ADDED_RANGE_KEY = "added_range" CHARGER_CHARGING_POWER_KEY = "charging_power" CHARGER_CHARGING_SPEED_KEY = "charging_speed" diff --git a/homeassistant/components/wallbox/sensor.py b/homeassistant/components/wallbox/sensor.py index 78b26520bec..4b0ec8175e3 100644 --- a/homeassistant/components/wallbox/sensor.py +++ b/homeassistant/components/wallbox/sensor.py @@ -27,6 +27,8 @@ from homeassistant.helpers.typing import StateType from .const import ( CHARGER_ADDED_DISCHARGED_ENERGY_KEY, CHARGER_ADDED_ENERGY_KEY, + CHARGER_ADDED_GREEN_ENERGY_KEY, + CHARGER_ADDED_GRID_ENERGY_KEY, CHARGER_ADDED_RANGE_KEY, CHARGER_CHARGING_POWER_KEY, CHARGER_CHARGING_SPEED_KEY, @@ -99,6 +101,22 @@ SENSOR_TYPES: dict[str, WallboxSensorEntityDescription] = { device_class=SensorDeviceClass.ENERGY, state_class=SensorStateClass.TOTAL_INCREASING, ), + CHARGER_ADDED_GREEN_ENERGY_KEY: WallboxSensorEntityDescription( + key=CHARGER_ADDED_GREEN_ENERGY_KEY, + translation_key=CHARGER_ADDED_GREEN_ENERGY_KEY, + precision=2, + native_unit_of_measurement=UnitOfEnergy.KILO_WATT_HOUR, + device_class=SensorDeviceClass.ENERGY, + state_class=SensorStateClass.TOTAL_INCREASING, + ), + CHARGER_ADDED_GRID_ENERGY_KEY: WallboxSensorEntityDescription( + key=CHARGER_ADDED_GRID_ENERGY_KEY, + translation_key=CHARGER_ADDED_GRID_ENERGY_KEY, + precision=2, + native_unit_of_measurement=UnitOfEnergy.KILO_WATT_HOUR, + device_class=SensorDeviceClass.ENERGY, + state_class=SensorStateClass.TOTAL_INCREASING, + ), CHARGER_ADDED_DISCHARGED_ENERGY_KEY: WallboxSensorEntityDescription( key=CHARGER_ADDED_DISCHARGED_ENERGY_KEY, translation_key=CHARGER_ADDED_DISCHARGED_ENERGY_KEY, diff --git a/homeassistant/components/wallbox/strings.json b/homeassistant/components/wallbox/strings.json index 7f401981286..68602a960c2 100644 --- a/homeassistant/components/wallbox/strings.json +++ b/homeassistant/components/wallbox/strings.json @@ -59,6 +59,12 @@ "added_energy": { "name": "Added energy" }, + "added_green_energy": { + "name": "Added green energy" + }, + "added_grid_energy": { + "name": "Added grid energy" + }, "added_discharged_energy": { "name": "Discharged energy" },