Add Mega Joule as valid unit of energy (#86055)

* Add Mega joule

* Reorder valid energy types

Alphabetical

* Add Mega Joule

* Add Mega Joule as valid energy unit

* Add Mega Joule

* Add Mega Joule as a Unit of Measurement to Energy

* Update tests

* Update tests

* Update number docstring

Co-authored-by: Roving Ronin <108674933+Roving-Ronin@users.noreply.github.com>
Co-authored-by: Erik Montnemery <erik@montnemery.com>
This commit is contained in:
SgtBatten
2023-01-26 00:13:42 +11:00
committed by GitHub
parent f182e314e5
commit 0ccab19d2c
8 changed files with 28 additions and 10 deletions

View File

@@ -159,7 +159,7 @@ class SensorDeviceClass(StrEnum):
ENERGY = "energy"
"""Energy.
Unit of measurement: `Wh`, `kWh`, `MWh`, `GJ`
Unit of measurement: `Wh`, `kWh`, `MWh`, `MJ`, `GJ`
"""
FREQUENCY = "frequency"