From 7db53b66d83ac9565ac55235a42fbecb623a892e Mon Sep 17 00:00:00 2001 From: Franck Nijhof Date: Tue, 20 May 2025 13:16:52 +0200 Subject: [PATCH] Add Wh/km unit for energy distance (#2673) --- docs/core/entity/number.md | 2 +- docs/core/entity/sensor.md | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/docs/core/entity/number.md b/docs/core/entity/number.md index 46c82df1..fd4c6430 100644 --- a/docs/core/entity/number.md +++ b/docs/core/entity/number.md @@ -46,7 +46,7 @@ If specifying a device class, your number entity will need to also return the co | `NumberDeviceClass.DISTANCE` | km, m, cm, mm, mi, nmi, yd, in | Generic distance | `NumberDeviceClass.DURATION` | d, h, min, s, ms, µs | Time period. Should not update only due to time passing. The device or service needs to give a new data point to update. | `NumberDeviceClass.ENERGY` | J, kJ, MJ, GJ, mWh, Wh, kWh, MWh, GWh, TWh, cal, kcal, Mcal, Gcal | Energy, this device class should be used to represent energy consumption, for example an electricity meter. Represents _power_ over _time_. Not to be confused with `power`. -| `NumberDeviceClass.ENERGY_DISTANCE` | kWh/100km, mi/kWh, km/kWh | Energy per distance, this device class should be used to represent energy consumption by distance, for example the amount of electric energy consumed by an electric car. +| `NumberDeviceClass.ENERGY_DISTANCE` | kWh/100km, Wh/km, mi/kWh, km/kWh | Energy per distance, this device class should be used to represent energy consumption by distance, for example the amount of electric energy consumed by an electric car. | `NumberDeviceClass.ENERGY_STORAGE` | J, kJ, MJ, GJ, mWh, Wh, kWh, MWh, GWh, TWh, cal, kcal, Mcal, Gcal | 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`. | `NumberDeviceClass.FREQUENCY` | Hz, kHz, MHz, GHz | Frequency | `NumberDeviceClass.GAS` | L, m³, ft³, CCF | Volume of gas. Gas consumption measured as energy in kWh instead of a volume should be classified as energy. diff --git a/docs/core/entity/sensor.md b/docs/core/entity/sensor.md index 6ad13fe5..fd392af9 100644 --- a/docs/core/entity/sensor.md +++ b/docs/core/entity/sensor.md @@ -48,7 +48,7 @@ If specifying a device class, your sensor entity will need to also return the co | `SensorDeviceClass.DISTANCE` | km, m, cm, mm, mi, nmi, yd, in | Generic distance | `SensorDeviceClass.DURATION` | d, h, min, s, ms, µ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` | J, kJ, MJ, GJ, mWh, Wh, kWh, MWh, GWh, TWh, cal, kcal, Mcal, Gcal | Energy, this device class should be used for sensors representing energy consumption, for example an electricity meter. Represents _power_ over _time_. Not to be confused with `power`. -| `SensorDeviceClass.ENERGY_DISTANCE` | kWh/100km, mi/kWh, km/kWh | Energy per distance, this device class should be used to represent energy consumption by distance, for example the amount of electric energy consumed by an electric car. +| `SensorDeviceClass.ENERGY_DISTANCE` | kWh/100km, Wh/km, mi/kWh, km/kWh | Energy per distance, this device class should be used to represent energy consumption by distance, for example the amount of electric energy consumed by an electric car. | `SensorDeviceClass.ENERGY_STORAGE` | J, kJ, MJ, GJ, mWh, Wh, kWh, MWh, GWh, TWh, cal, kcal, Mcal, Gcal | 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`. | `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