|
4 | 4 | from homeassistant.components.sensor import (SensorDeviceClass, SensorEntity, |
5 | 5 | SensorEntityDescription, |
6 | 6 | SensorStateClass) |
7 | | -from homeassistant.const import (LENGTH_KILOMETERS, PERCENTAGE, POWER_WATT, |
| 7 | +from homeassistant.const import (ENERGY_WATT_HOUR, LENGTH_KILOMETERS, PERCENTAGE, POWER_WATT, |
8 | 8 | PRESSURE_BAR, SPEED_KILOMETERS_PER_HOUR, |
9 | 9 | TEMP_CELSIUS, TIME_SECONDS) |
10 | 10 | from homeassistant.helpers.entity import EntityCategory |
|
33 | 33 | SensorEntityDescription( |
34 | 34 | key="average_energy_consumption", |
35 | 35 | name="Energy used (average)", |
36 | | - native_unit_of_measurement=POWER_WATT, |
| 36 | + native_unit_of_measurement=ENERGY_WATT_HOUR, |
37 | 37 | device_class=SensorDeviceClass.POWER, |
38 | 38 | state_class=SensorStateClass.MEASUREMENT, |
39 | 39 | ), |
|
110 | 110 | SensorEntityDescription( |
111 | 111 | key="total_energy_consumption", |
112 | 112 | name="Energy used (total)", |
113 | | - native_unit_of_measurement=POWER_WATT, |
| 113 | + native_unit_of_measurement=ENERGY_WATT_HOUR, |
114 | 114 | device_class=SensorDeviceClass.POWER, |
115 | 115 | state_class=SensorStateClass.MEASUREMENT, |
116 | 116 | ), |
|
0 commit comments