Add state_class to Modbus sensor (#18809)

This commit is contained in:
Matthias Alphart 2021-08-25 12:32:16 +02:00 committed by GitHub
parent f98110a523
commit 94d7bf171b
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23

View File

@ -852,6 +852,10 @@ sensors:
description: Unit to attach to value. description: Unit to attach to value.
required: false required: false
type: integer type: integer
state_class:
description: The [state_class](https://developers.home-assistant.io/docs/core/entity/sensor#available-state-classes) of the sensor.
required: false
type: string
{% endconfiguration %} {% endconfiguration %}
<div class='note'> <div class='note'>
@ -876,6 +880,7 @@ modbus:
address: 0 address: 0
input_type: holding input_type: holding
unit_of_measurement: °C unit_of_measurement: °C
state_class: measurement
count: 1 count: 1
scale: 0.1 scale: 0.1
offset: 0 offset: 0