mirror of
https://github.com/esphome/esphome-docs.git
synced 2024-12-26 17:27:47 +01:00
Add support for Sensor state class (#1201)
This commit is contained in:
parent
cdfe0ef1a4
commit
b68ee95a6b
@ -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.
|
||||
|
Loading…
Reference in New Issue
Block a user