|
9 | 9 | SensorStateClass,
|
10 | 10 | )
|
11 | 11 | from homeassistant.const import (
|
12 |
| - ENERGY_KILO_WATT_HOUR |
| 12 | + UnitOfEnergy |
13 | 13 | )
|
14 | 14 |
|
15 | 15 | DOMAIN = "solaredge_forecast"
|
@@ -56,31 +56,31 @@ class SolaredgeForecastSensorEntityDescription(SensorEntityDescription):
|
56 | 56 | key="solaredge_forecast",
|
57 | 57 | name="Solar energy forecast",
|
58 | 58 | icon="mdi:solar-power",
|
59 |
| - native_unit_of_measurement=ENERGY_KILO_WATT_HOUR, |
| 59 | + native_unit_of_measurement=UnitOfEnergy.KILO_WATT_HOUR, |
60 | 60 | device_class=SensorDeviceClass.ENERGY,
|
61 | 61 | state_class=SensorStateClass.TOTAL,
|
62 | 62 | ),
|
63 | 63 | SolaredgeForecastSensorEntityDescription(
|
64 | 64 | key="solaredge_produced",
|
65 | 65 | name="Solar energy produced",
|
66 | 66 | icon="mdi:solar-power",
|
67 |
| - native_unit_of_measurement=ENERGY_KILO_WATT_HOUR, |
| 67 | + native_unit_of_measurement=UnitOfEnergy.KILO_WATT_HOUR, |
68 | 68 | device_class=SensorDeviceClass.ENERGY,
|
69 | 69 | state_class=SensorStateClass.TOTAL,
|
70 | 70 | ),
|
71 | 71 | SolaredgeForecastSensorEntityDescription(
|
72 | 72 | key="solaredge_estimated",
|
73 | 73 | name="Solar energy expected",
|
74 | 74 | icon="mdi:solar-power",
|
75 |
| - native_unit_of_measurement=ENERGY_KILO_WATT_HOUR, |
| 75 | + native_unit_of_measurement=UnitOfEnergy.KILO_WATT_HOUR, |
76 | 76 | device_class=SensorDeviceClass.ENERGY,
|
77 | 77 | state_class=SensorStateClass.TOTAL,
|
78 | 78 | ),
|
79 | 79 | SolaredgeForecastSensorEntityDescription(
|
80 | 80 | key="solaredge_progress",
|
81 | 81 | name="Solar energy progress",
|
82 | 82 | icon="mdi:solar-power",
|
83 |
| - native_unit_of_measurement=ENERGY_KILO_WATT_HOUR, |
| 83 | + native_unit_of_measurement=UnitOfEnergy.KILO_WATT_HOUR, |
84 | 84 | device_class=SensorDeviceClass.ENERGY,
|
85 | 85 | state_class=SensorStateClass.TOTAL,
|
86 | 86 | ),
|
|
0 commit comments