Rename sensor_class to device_class
This commit is contained in:
parent
4b6358c12b
commit
b83f3855ee
8 changed files with 19 additions and 19 deletions
|
@ -29,7 +29,7 @@ Configuration variables:
|
|||
|
||||
- **sensors** array (*Required*): List of your sensors.
|
||||
- **friendly_name** (*Optional*): Name to use in the Frontend.
|
||||
- **sensor_class** (*Optional*): The [type/class](/components/binary_sensor/) of the sensor to set the icon in the frontend.
|
||||
- **device_class** (*Optional*): The [type/class](/components/binary_sensor/) of the sensor to set the icon in the frontend.
|
||||
- **value_template** (*Optional*): Defines a [template](/topics/templating/) to extract a value from the payload.
|
||||
- **entity_id** (*Optional*): Add a list of entity IDs so the sensor only reacts to state changes of these entities. This will reduce the number of times the sensor will try to update it's state.
|
||||
|
||||
|
@ -48,7 +48,7 @@ sensor:
|
|||
furnace_on:
|
||||
value_template: {% raw %}{{ states.sensor.furnace.state > 2.5 }}{% endraw %}
|
||||
friendly_name: 'Furnace Running
|
||||
sensor_class: heat
|
||||
device_class: heat
|
||||
```
|
||||
|
||||
### {% linkable_title Switch as sensor %}
|
||||
|
@ -61,10 +61,10 @@ binary_sensor:
|
|||
sensors:
|
||||
movement:
|
||||
value_template: {% raw %}"{{ states.switch.movement.state == 'on' }}"{% endraw %}
|
||||
sensor_class: motion
|
||||
device_class: motion
|
||||
door:
|
||||
value_template: {% raw %}"{{ states.switch.door.state == 'on' }}"{% endraw %}
|
||||
sensor_class: opening
|
||||
device_class: opening
|
||||
```
|
||||
|
||||
|
||||
|
@ -78,7 +78,7 @@ binary_sensor:
|
|||
sensors:
|
||||
co:
|
||||
friendly_name: 'CO'
|
||||
sensor_class: 'gas'
|
||||
device_class: 'gas'
|
||||
value_template: {% raw %}>-
|
||||
{%- if is_state("sensor.bedroom_co_status", "Ok")
|
||||
and is_state("sensor.kitchen_co_status", "Ok")
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue