From 520ba8bc5014a2a42d690e314ccf8c3518a803e9 Mon Sep 17 00:00:00 2001 From: epenet <6771947+epenet@users.noreply.github.com> Date: Thu, 8 Dec 2022 16:50:34 +0100 Subject: [PATCH] Add new data size device class (#1576) --- docs/core/entity/number.md | 1 + docs/core/entity/sensor.md | 1 + 2 files changed, 2 insertions(+) diff --git a/docs/core/entity/number.md b/docs/core/entity/number.md index 31aab935..a6043409 100644 --- a/docs/core/entity/number.md +++ b/docs/core/entity/number.md @@ -37,6 +37,7 @@ If specifying a device class, your number entity will need to also return the co | carbon_dioxide | ppm | Concentration of carbon dioxide. | carbon_monoxide | ppm | Concentration of carbon monoxide. | current | A | Current +| 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 | distance | km, m, cm, mm, mi, yd, in | Generic distance | energy | Wh, kWh, MWh | Energy. Represents _power_ over _time_. Not to be confused with `power`. | frequency | Hz, kHz, MHz, GHz | Frequency diff --git a/docs/core/entity/sensor.md b/docs/core/entity/sensor.md index d79b213f..9528178e 100644 --- a/docs/core/entity/sensor.md +++ b/docs/core/entity/sensor.md @@ -37,6 +37,7 @@ If specifying a device class, your sensor entity will need to also return the co | carbon_dioxide | ppm | Concentration of carbon dioxide. | carbon_monoxide | ppm | Concentration of carbon monoxide. | current | A | Current +| 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 | date | | Date. Requires `native_value` to be a Python `datetime.date` object, or `None`. | distance | km, m, cm, mm, mi, yd, in | Generic distance | 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.