From 7d82bb1c1231ef4c45ca08dda5d30d10c9a0c0a0 Mon Sep 17 00:00:00 2001 From: Carlos Cristobal Date: Thu, 5 Jan 2023 18:59:16 +0000 Subject: [PATCH] Add calorie and bpm to units --- homeassistant/components/sensor/const.py | 4 ++-- homeassistant/const.py | 2 ++ 2 files changed, 4 insertions(+), 2 deletions(-) diff --git a/homeassistant/components/sensor/const.py b/homeassistant/components/sensor/const.py index 190b153ca7a..5d53ca601e9 100644 --- a/homeassistant/components/sensor/const.py +++ b/homeassistant/components/sensor/const.py @@ -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" diff --git a/homeassistant/const.py b/homeassistant/const.py index d113b182484..160af6d60ef 100644 --- a/homeassistant/const.py +++ b/homeassistant/const.py @@ -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"