From 23c23421aa122a53c05407c64b55983191fdb5b1 Mon Sep 17 00:00:00 2001 From: dougiteixeira <31328123+dougiteixeira@users.noreply.github.com> Date: Sun, 25 Feb 2024 19:29:42 -0300 Subject: [PATCH] Add device class support to text sensor (#3599) Co-authored-by: Jesse Hills <3060199+jesserockz@users.noreply.github.com> --- components/text_sensor/index.rst | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/components/text_sensor/index.rst b/components/text_sensor/index.rst index c91a0997d..9638ced99 100644 --- a/components/text_sensor/index.rst +++ b/components/text_sensor/index.rst @@ -32,6 +32,10 @@ Configuration variables: you want the text sensor to use that name, you can set ``name: None``. - **icon** (*Optional*, icon): Manually set the icon to use for the sensor in the frontend. +- **device_class** (*Optional*, string): The device class for the + sensor. Only the ``timestamp`` and ``date`` device classes are supported. + Set to ``""`` to remove the default device class of a sensor. + Requires Home Assistant 2024.3 or newer. - **internal** (*Optional*, boolean): Mark this component as internal. Internal components will not be exposed to the frontend (like Home Assistant). Only specifying an ``id`` without a ``name`` will implicitly set this to true.