Skip to content

Commit 19845c5

Browse files
authored
Document ENERGY_STORAGE and VOLUME_STORAGE device classes. (#1698)
1 parent 0b2e058 commit 19845c5

File tree

2 files changed

+8
-4
lines changed

2 files changed

+8
-4
lines changed

docs/core/entity/number.md

Lines changed: 4 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -41,7 +41,8 @@ If specifying a device class, your number entity will need to also return the co
4141
| `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
4242
| `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
4343
| `NumberDeviceClass.DISTANCE` | km, m, cm, mm, mi, yd, in | Generic distance
44-
| `NumberDeviceClass.ENERGY` | Wh, kWh, MWh, MJ, GJ | Energy. Represents _power_ over _time_. Not to be confused with `power`.
44+
| `NumberDeviceClass.ENERGY` | Wh, kWh, MWh, MJ, GJ | Energy, this device class should used to represent energy consumption, for example an electricity meter. Represents _power_ over _time_. Not to be confused with `power`.
45+
| `NumberDeviceClass.ENERGY_STORAGE` | Wh, kWh, MWh, MJ, GJ | Stored energy, this device class should be used to represent stored energy, for example the amount of electric energy currently stored in a battery or the capacity of a battery. Represents _power_ over _time_. Not to be confused with `power`.
4546
| `NumberDeviceClass.FREQUENCY` | Hz, kHz, MHz, GHz | Frequency
4647
| `NumberDeviceClass.GAS` | m³, ft³, CCF | Volume of gas. Gas consumption measured as energy in kWh instead of a volume should be classified as energy.
4748
| `NumberDeviceClass.HUMIDITY` | % | Relative humidity
@@ -69,7 +70,8 @@ If specifying a device class, your number entity will need to also return the co
6970
| `NumberDeviceClass.TEMPERATURE` | °C, °F, K | Temperature.
7071
| `NumberDeviceClass.VOLATILE_ORGANIC_COMPOUNDS` | µg/m³ | Concentration of volatile organic compounds
7172
| `NumberDeviceClass.VOLTAGE` | V, mV | Voltage
72-
| `NumberDeviceClass.VOLUME` | L, mL, gal, fl. oz., m³, ft³, CCF | Generic volume
73+
| `NumberDeviceClass.VOLUME` | L, mL, gal, fl. oz., m³, ft³, CCF | Generic volume, this device class should be used to represent a consumption, for example the amount of fuel consumed by a vehicle.
74+
| `NumberDeviceClass.VOLUME_STORAGE` | L, mL, gal, fl. oz., m³, ft³, CCF | Generic stored volume, this device class should be used to represent a stored volume, for example the amount of fuel in a fuel tank.
7375
| `NumberDeviceClass.WATER` | L, gal, m³, ft³, CCF | Water consumption
7476
| `NumberDeviceClass.WEIGHT` | kg, g, mg, µg, oz, lb, st | Generic mass; `weight` is used instead of `mass` to fit with every day language.
7577
| `NumberDeviceClass.WIND_SPEED` | ft/s, km/h, kn, m/s, mph | Wind speed

docs/core/entity/sensor.md

Lines changed: 4 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -44,7 +44,8 @@ If specifying a device class, your sensor entity will need to also return the co
4444
| `SensorDeviceClass.DATE` | | Date. Requires `native_value` to be a Python `datetime.date` object, or `None`.
4545
| `SensorDeviceClass.DISTANCE` | km, m, cm, mm, mi, yd, in | Generic distance
4646
| `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.
47-
| `SensorDeviceClass.ENERGY` | Wh, kWh, MWh, MJ, GJ | Energy. Represents _power_ over _time_. Not to be confused with `power`.
47+
| `SensorDeviceClass.ENERGY` | Wh, kWh, MWh, MJ, GJ | Energy, this device class should used for sensors representing energy consumption, for example an electricity meter. Represents _power_ over _time_. Not to be confused with `power`.
48+
| `SensorDeviceClass.ENERGY_STORAGE` | Wh, kWh, MWh, MJ, GJ | Stored energy, this device class should be used for sensors representing stored energy, for example the amount of electric energy currently stored in a battery or the capacity of a battery. Represents _power_ over _time_. Not to be confused with `power`.
4849
| `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.
4950
| `SensorDeviceClass.FREQUENCY` | Hz, kHz, MHz, GHz | Frequency
5051
| `SensorDeviceClass.GAS` | m³, ft³, CCF | Volume of gas. Gas consumption measured as energy in kWh instead of a volume should be classified as energy.
@@ -74,7 +75,8 @@ If specifying a device class, your sensor entity will need to also return the co
7475
| `SensorDeviceClass.TIMESTAMP` | | Timestamp. Requires `native_value` to return a Python `datetime.datetime` object, with time zone information, or `None`.
7576
| `SensorDeviceClass.VOLATILE_ORGANIC_COMPOUNDS` | µg/m³ | Concentration of volatile organic compounds
7677
| `SensorDeviceClass.VOLTAGE` | V, mV | Voltage
77-
| `SensorDeviceClass.VOLUME` | L, mL, gal, fl. oz., m³, ft³, CCF | Generic volume
78+
| `SensorDeviceClass.VOLUME` | L, mL, gal, fl. oz., m³, ft³, CCF | Generic volume, this device class should be used for sensors representing a consumption, for example the amount of fuel consumed by a vehicle.
79+
| `SensorDeviceClass.VOLUME_STORAGE` | L, mL, gal, fl. oz., m³, ft³, CCF | Generic stored volume, this device class should be used for sensors representing a stored volume, for example the amount of fuel in a fuel tank.
7880
| `SensorDeviceClass.WATER` | L, gal, m³, ft³, CCF | Water consumption
7981
| `SensorDeviceClass.WEIGHT` | kg, g, mg, µg, oz, lb, st | Generic mass; `weight` is used instead of `mass` to fit with every day language.
8082
| `SensorDeviceClass.WIND_SPEED` | ft/s, km/h, kn, m/s, mph | Wind speed

0 commit comments

Comments
 (0)