Skip to content

Commit

Permalink
feat: fit HA Core 2025.1 const
Browse files Browse the repository at this point in the history
  • Loading branch information
tinymins committed Dec 16, 2024
1 parent 0594ce4 commit 41a83e7
Showing 1 changed file with 9 additions and 9 deletions.
18 changes: 9 additions & 9 deletions custom_components/ups_over_network/const.py
Original file line number Diff line number Diff line change
@@ -1,18 +1,18 @@
from homeassistant.const import (
ELECTRIC_POTENTIAL_VOLT,
FREQUENCY_HERTZ,
TEMP_CELSIUS,
UnitOfElectricPotential,
UnitOfFrequency,
UnitOfTemperature,
PERCENTAGE
)

# Define sensor types and units
SENSOR_DEFINITIONS = {
"raw": ["Raw", "", "mdi:text-box-outline"],
"input_voltage": ["Input Voltage", ELECTRIC_POTENTIAL_VOLT, "mdi:flash"],
"fault_voltage": ["Fault Voltage", ELECTRIC_POTENTIAL_VOLT, "mdi:flash-off"],
"output_voltage": ["Output Voltage", ELECTRIC_POTENTIAL_VOLT, "mdi:flash"],
"input_voltage": ["Input Voltage", UnitOfElectricPotential.VOLT, "mdi:flash"],
"fault_voltage": ["Fault Voltage", UnitOfElectricPotential.VOLT, "mdi:flash-off"],
"output_voltage": ["Output Voltage", UnitOfElectricPotential.VOLT, "mdi:flash"],
"load": ["Load", PERCENTAGE, "mdi:gauge"],
"frequency": ["Frequency", FREQUENCY_HERTZ, "mdi:current-ac"],
"battery_voltage": ["Battery Voltage", ELECTRIC_POTENTIAL_VOLT, "mdi:battery"],
"temperature": ["Temperature", TEMP_CELSIUS, "mdi:thermometer"],
"frequency": ["Frequency", UnitOfFrequency.HERTZ, "mdi:current-ac"],
"battery_voltage": ["Battery Voltage", UnitOfElectricPotential.VOLT, "mdi:battery"],
"temperature": ["Temperature", UnitOfTemperature.CELSIUS, "mdi:thermometer"],
}

0 comments on commit 41a83e7

Please sign in to comment.