Skip to content

Commit

Permalink
New units, fixes #24
Browse files Browse the repository at this point in the history
  • Loading branch information
CJNE authored Aug 4, 2021
1 parent 7cf1ca8 commit 66eed01
Showing 1 changed file with 3 additions and 3 deletions.
6 changes: 3 additions & 3 deletions custom_components/sunspec/sensor.py
Original file line number Diff line number Diff line change
Expand Up @@ -10,6 +10,7 @@
from homeassistant.const import DEVICE_CLASS_TEMPERATURE
from homeassistant.const import DEVICE_CLASS_VOLTAGE
from homeassistant.const import ELECTRIC_CURRENT_AMPERE
from homeassistant.const import ELECTRIC_POTENTIAL_VOLT
from homeassistant.const import ENERGY_KILO_WATT_HOUR
from homeassistant.const import ENERGY_WATT_HOUR
from homeassistant.const import FREQUENCY_HERTZ
Expand All @@ -24,7 +25,6 @@
from homeassistant.const import TEMP_CELSIUS
from homeassistant.const import TIME_MILLISECONDS
from homeassistant.const import TIME_SECONDS
from homeassistant.const import VOLT

from . import get_sunspec_unique_id
from .const import CONF_PREFIX
Expand All @@ -47,10 +47,10 @@
"HPa": [PRESSURE_HPA, ICON_DEFAULT, DEVICE_CLASS_TEMPERATURE],
"Hz": [FREQUENCY_HERTZ, ICON_FREQ, None],
"Mbps": [DATA_RATE_MEGABITS_PER_SECOND, ICON_DEFAULT, None],
"V": [VOLT, ICON_VOLT, DEVICE_CLASS_VOLTAGE],
"V": [ELECTRIC_POTENTIAL_VOLT, ICON_VOLT, DEVICE_CLASS_VOLTAGE],
"VA": [POWER_VOLT_AMPERE, ICON_POWER, DEVICE_CLASS_POWER],
"W": [POWER_WATT, ICON_POWER, DEVICE_CLASS_POWER],
"W/m2": [IRRADIATION_WATTS_PER_SQUARE_METER, ICON_DEFAULT, None],
"W/m2": [IRRADIATION_WATTS_PER_SQUARE_METER, ICON_DEFAULT, None],
"Wh": [ENERGY_WATT_HOUR, ICON_ENERGY, DEVICE_CLASS_ENERGY],
"WH": [ENERGY_WATT_HOUR, ICON_ENERGY, DEVICE_CLASS_ENERGY],
"bps": [DATA_RATE_BITS_PER_SECOND, ICON_DEFAULT, None],
Expand Down

0 comments on commit 66eed01

Please sign in to comment.