Add calorie and bpm to units

This commit is contained in:
Carlos Cristobal
2023-01-05 18:59:16 +00:00
parent b30ce5e85e
commit 7d82bb1c12
2 changed files with 4 additions and 2 deletions

View File

@@ -157,13 +157,13 @@ class SensorDeviceClass(StrEnum):
ENERGY = "energy"
"""Energy.
Unit of measurement: `Wh`, `kWh`, `MWh`, `GJ`
Unit of measurement: `Wh`, `kWh`, `MWh`, `GJ`, `cal`
"""
FREQUENCY = "frequency"
"""Frequency.
Unit of measurement: `Hz`, `kHz`, `MHz`, `GHz`
Unit of measurement: `Hz`, `kHz`, `MHz`, `GHz`, `bpm`
"""
GAS = "gas"

View File

@@ -519,6 +519,7 @@ class UnitOfEnergy(StrEnum):
KILO_WATT_HOUR = "kWh"
MEGA_WATT_HOUR = "MWh"
WATT_HOUR = "Wh"
CALORIE = "cal"
ENERGY_KILO_WATT_HOUR: Final = "kWh"
@@ -657,6 +658,7 @@ class UnitOfFrequency(StrEnum):
KILOHERTZ = "kHz"
MEGAHERTZ = "MHz"
GIGAHERTZ = "GHz"
BPM = "bpm"
FREQUENCY_HERTZ: Final = "Hz"