Add support for Sensor state class (#1201)

This commit is contained in:
Franck Nijhof 2021-06-03 03:50:14 +02:00 committed by GitHub
parent cdfe0ef1a4
commit b68ee95a6b
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23

View File

@ -28,6 +28,7 @@ override them if you want to.
unit_of_measurement: "°C"
icon: "mdi:water-percent"
device_class: "temperature"
state_class: "measurement"
accuracy_decimals: 1
expire_after: 30s
filters:
@ -44,6 +45,9 @@ Configuration variables:
- **device_class** (*Optional*, string): The device class for the
sensor. See https://www.home-assistant.io/integrations/sensor/#device-class
for a list of available options. Set to ``""`` to remove the default device class of a sensor.
- **state_class** (*Optional*, string): The state class for the
sensor. See https://developers.home-assistant.io/docs/core/entity/sensor/#available-state-classes
for a list of available options. Set to ``""`` to remove the default state class of a sensor.
- **icon** (*Optional*, icon): Manually set the icon to use for the sensor in the frontend. The icon set here
is ignored by Home Assistant, if a device class is already set.
- **accuracy_decimals** (*Optional*, int): Manually set the accuracy of decimals to use when reporting values.