mirror of
https://github.com/home-assistant/core.git
synced 2025-07-25 22:27:07 +00:00
Add sensors to Wallbox (#145247)
This commit is contained in:
parent
c60f19b35b
commit
46fe132e83
@ -11,6 +11,8 @@ CODE_KEY = "code"
|
|||||||
CONF_STATION = "station"
|
CONF_STATION = "station"
|
||||||
CHARGER_ADDED_DISCHARGED_ENERGY_KEY = "added_discharged_energy"
|
CHARGER_ADDED_DISCHARGED_ENERGY_KEY = "added_discharged_energy"
|
||||||
CHARGER_ADDED_ENERGY_KEY = "added_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_ADDED_RANGE_KEY = "added_range"
|
||||||
CHARGER_CHARGING_POWER_KEY = "charging_power"
|
CHARGER_CHARGING_POWER_KEY = "charging_power"
|
||||||
CHARGER_CHARGING_SPEED_KEY = "charging_speed"
|
CHARGER_CHARGING_SPEED_KEY = "charging_speed"
|
||||||
|
@ -27,6 +27,8 @@ from homeassistant.helpers.typing import StateType
|
|||||||
from .const import (
|
from .const import (
|
||||||
CHARGER_ADDED_DISCHARGED_ENERGY_KEY,
|
CHARGER_ADDED_DISCHARGED_ENERGY_KEY,
|
||||||
CHARGER_ADDED_ENERGY_KEY,
|
CHARGER_ADDED_ENERGY_KEY,
|
||||||
|
CHARGER_ADDED_GREEN_ENERGY_KEY,
|
||||||
|
CHARGER_ADDED_GRID_ENERGY_KEY,
|
||||||
CHARGER_ADDED_RANGE_KEY,
|
CHARGER_ADDED_RANGE_KEY,
|
||||||
CHARGER_CHARGING_POWER_KEY,
|
CHARGER_CHARGING_POWER_KEY,
|
||||||
CHARGER_CHARGING_SPEED_KEY,
|
CHARGER_CHARGING_SPEED_KEY,
|
||||||
@ -99,6 +101,22 @@ SENSOR_TYPES: dict[str, WallboxSensorEntityDescription] = {
|
|||||||
device_class=SensorDeviceClass.ENERGY,
|
device_class=SensorDeviceClass.ENERGY,
|
||||||
state_class=SensorStateClass.TOTAL_INCREASING,
|
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(
|
CHARGER_ADDED_DISCHARGED_ENERGY_KEY: WallboxSensorEntityDescription(
|
||||||
key=CHARGER_ADDED_DISCHARGED_ENERGY_KEY,
|
key=CHARGER_ADDED_DISCHARGED_ENERGY_KEY,
|
||||||
translation_key=CHARGER_ADDED_DISCHARGED_ENERGY_KEY,
|
translation_key=CHARGER_ADDED_DISCHARGED_ENERGY_KEY,
|
||||||
|
@ -59,6 +59,12 @@
|
|||||||
"added_energy": {
|
"added_energy": {
|
||||||
"name": "Added energy"
|
"name": "Added energy"
|
||||||
},
|
},
|
||||||
|
"added_green_energy": {
|
||||||
|
"name": "Added green energy"
|
||||||
|
},
|
||||||
|
"added_grid_energy": {
|
||||||
|
"name": "Added grid energy"
|
||||||
|
},
|
||||||
"added_discharged_energy": {
|
"added_discharged_energy": {
|
||||||
"name": "Discharged energy"
|
"name": "Discharged energy"
|
||||||
},
|
},
|
||||||
|
Loading…
x
Reference in New Issue
Block a user