Skip to content

Commit 41a83e7

Browse files
committed
feat: fit HA Core 2025.1 const
1 parent 0594ce4 commit 41a83e7

File tree

1 file changed

+9
-9
lines changed
  • custom_components/ups_over_network

1 file changed

+9
-9
lines changed
Lines changed: 9 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -1,18 +1,18 @@
11
from homeassistant.const import (
2-
ELECTRIC_POTENTIAL_VOLT,
3-
FREQUENCY_HERTZ,
4-
TEMP_CELSIUS,
2+
UnitOfElectricPotential,
3+
UnitOfFrequency,
4+
UnitOfTemperature,
55
PERCENTAGE
66
)
77

88
# Define sensor types and units
99
SENSOR_DEFINITIONS = {
1010
"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"],
1414
"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"],
1818
}

0 commit comments

Comments
 (0)