|
1 | 1 | from homeassistant.const import (
|
2 |
| - ELECTRIC_POTENTIAL_VOLT, |
3 |
| - FREQUENCY_HERTZ, |
4 |
| - TEMP_CELSIUS, |
| 2 | + UnitOfElectricPotential, |
| 3 | + UnitOfFrequency, |
| 4 | + UnitOfTemperature, |
5 | 5 | PERCENTAGE
|
6 | 6 | )
|
7 | 7 |
|
8 | 8 | # Define sensor types and units
|
9 | 9 | SENSOR_DEFINITIONS = {
|
10 | 10 | "raw": ["Raw", "", "mdi:text-box-outline"],
|
11 |
| - "input_voltage": ["Input Voltage", ELECTRIC_POTENTIAL_VOLT, "mdi:flash"], |
12 |
| - "fault_voltage": ["Fault Voltage", ELECTRIC_POTENTIAL_VOLT, "mdi:flash-off"], |
13 |
| - "output_voltage": ["Output Voltage", ELECTRIC_POTENTIAL_VOLT, "mdi:flash"], |
| 11 | + "input_voltage": ["Input Voltage", UnitOfElectricPotential.VOLT, "mdi:flash"], |
| 12 | + "fault_voltage": ["Fault Voltage", UnitOfElectricPotential.VOLT, "mdi:flash-off"], |
| 13 | + "output_voltage": ["Output Voltage", UnitOfElectricPotential.VOLT, "mdi:flash"], |
14 | 14 | "load": ["Load", PERCENTAGE, "mdi:gauge"],
|
15 |
| - "frequency": ["Frequency", FREQUENCY_HERTZ, "mdi:current-ac"], |
16 |
| - "battery_voltage": ["Battery Voltage", ELECTRIC_POTENTIAL_VOLT, "mdi:battery"], |
17 |
| - "temperature": ["Temperature", TEMP_CELSIUS, "mdi:thermometer"], |
| 15 | + "frequency": ["Frequency", UnitOfFrequency.HERTZ, "mdi:current-ac"], |
| 16 | + "battery_voltage": ["Battery Voltage", UnitOfElectricPotential.VOLT, "mdi:battery"], |
| 17 | + "temperature": ["Temperature", UnitOfTemperature.CELSIUS, "mdi:thermometer"], |
18 | 18 | }
|
0 commit comments