1
0
mirror of https://github.com/home-assistant/core.git synced 2025-12-24 21:06:19 +00:00

Add support for MW/GW/TW and GWh/TWh (#130089)

This commit is contained in:
Jakob Schlyter
2024-11-08 22:12:16 +01:00
committed by GitHub
parent 742eca5927
commit cd11f01ace
8 changed files with 41 additions and 12 deletions

View File

@@ -725,6 +725,9 @@ class UnitOfPower(StrEnum):
WATT = "W"
KILO_WATT = "kW"
MEGA_WATT = "MW"
GIGA_WATT = "GW"
TERA_WATT = "TW"
BTU_PER_HOUR = "BTU/h"
@@ -770,6 +773,8 @@ class UnitOfEnergy(StrEnum):
WATT_HOUR = "Wh"
KILO_WATT_HOUR = "kWh"
MEGA_WATT_HOUR = "MWh"
GIGA_WATT_HOUR = "GWh"
TERA_WATT_HOUR = "TWh"
CALORIE = "cal"
KILO_CALORIE = "kcal"
MEGA_CALORIE = "Mcal"