Add MJ and GJ energy types (#1639)

This commit is contained in:
SgtBatten 2023-01-26 00:25:08 +11:00 committed by GitHub
parent 5071e5e05f
commit fa7f6f2a7b
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
2 changed files with 2 additions and 2 deletions

View File

@ -41,7 +41,7 @@ If specifying a device class, your number entity will need to also return the co
| `NumberDeviceClass.DATA_RATE` | bit/s, kbit/s, Mbit/s, Gbit/s, B/s, kB/s, MB/s, GB/s, KiB/s, MiB/s, GiB/s | Data rate | `NumberDeviceClass.DATA_RATE` | bit/s, kbit/s, Mbit/s, Gbit/s, B/s, kB/s, MB/s, GB/s, KiB/s, MiB/s, GiB/s | Data rate
| `NumberDeviceClass.DATA_SIZE` | bit, kbit, Mbit, Gbit, B, kB, MB, GB, TB, PB, EB, ZB, YB, KiB, MiB, GiB, TiB, PiB, EiB, ZiB, YiB | Data size | `NumberDeviceClass.DATA_SIZE` | bit, kbit, Mbit, Gbit, B, kB, MB, GB, TB, PB, EB, ZB, YB, KiB, MiB, GiB, TiB, PiB, EiB, ZiB, YiB | Data size
| `NumberDeviceClass.DISTANCE` | km, m, cm, mm, mi, yd, in | Generic distance | `NumberDeviceClass.DISTANCE` | km, m, cm, mm, mi, yd, in | Generic distance
| `NumberDeviceClass.ENERGY` | Wh, kWh, MWh | Energy. Represents _power_ over _time_. Not to be confused with `power`. | `NumberDeviceClass.ENERGY` | Wh, kWh, MWh, MJ, GJ | Energy. Represents _power_ over _time_. Not to be confused with `power`.
| `NumberDeviceClass.FREQUENCY` | Hz, kHz, MHz, GHz | Frequency | `NumberDeviceClass.FREQUENCY` | Hz, kHz, MHz, GHz | Frequency
| `NumberDeviceClass.GAS` | m³, ft³, CCF | Volume of gas. Gas consumption measured as energy in kWh instead of a volume should be classified as energy. | `NumberDeviceClass.GAS` | m³, ft³, CCF | Volume of gas. Gas consumption measured as energy in kWh instead of a volume should be classified as energy.
| `NumberDeviceClass.HUMIDITY` | % | Relative humidity | `NumberDeviceClass.HUMIDITY` | % | Relative humidity

View File

@ -44,7 +44,7 @@ If specifying a device class, your sensor entity will need to also return the co
| `SensorDeviceClass.DATE` | | Date. Requires `native_value` to be a Python `datetime.date` object, or `None`. | `SensorDeviceClass.DATE` | | Date. Requires `native_value` to be a Python `datetime.date` object, or `None`.
| `SensorDeviceClass.DISTANCE` | km, m, cm, mm, mi, yd, in | Generic distance | `SensorDeviceClass.DISTANCE` | km, m, cm, mm, mi, yd, in | Generic distance
| `SensorDeviceClass.DURATION` | d, h, min, s | Time period. Should not update only due to time passing. The device or service needs to give a new data point to update. | `SensorDeviceClass.DURATION` | d, h, min, s | Time period. Should not update only due to time passing. The device or service needs to give a new data point to update.
| `SensorDeviceClass.ENERGY` | Wh, kWh, MWh | Energy, statistics will be stored in kWh. Represents _power_ over _time_. Not to be confused with `power`. | `SensorDeviceClass.ENERGY` | Wh, kWh, MWh, MJ, GJ | Energy, statistics will be stored in kWh. Represents _power_ over _time_. Not to be confused with `power`.
| `SensorDeviceClass.ENUM` | | The sensor has a limited set of (non-numeric) states. The `options` property must be set to a list of possible states when using this device class. | `SensorDeviceClass.ENUM` | | The sensor has a limited set of (non-numeric) states. The `options` property must be set to a list of possible states when using this device class.
| `SensorDeviceClass.FREQUENCY` | Hz, kHz, MHz, GHz | Frequency | `SensorDeviceClass.FREQUENCY` | Hz, kHz, MHz, GHz | Frequency
| `SensorDeviceClass.GAS` | m³, ft³, CCF | Volume of gas, statistics will be stored in m³. Gas consumption measured as energy in kWh instead of a volume should be classified as energy. | `SensorDeviceClass.GAS` | m³, ft³, CCF | Volume of gas, statistics will be stored in m³. Gas consumption measured as energy in kWh instead of a volume should be classified as energy.