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:
|
|||
|
||||
- **command** (*Required*): The action to take to get the value.
|
||||
- **name** (*Optional*): Let you overwrite the the name of the device. By default *name* from the device is used.
|
||||
- **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.
|
||||
- **payload_on** (*Optional*): The payload that represents enabled state. Default is "ON".
|
||||
- **payload_off** (*Optional*): The payload that represents disabled state. Default is "OFF".
|
||||
- **value_template** (*Optional*): Defines a [template](/topics/templating/) to extract a value from the payload.
|
||||
|
@ -48,7 +48,7 @@ binary_sensor:
|
|||
- platform: command_line
|
||||
command: netstat -na | find "33322" | find /c "LISTENING" > nul && (echo "Running") || (echo "Not running")
|
||||
name: 'sickragerunning'
|
||||
sensor_class: moving
|
||||
device_class: moving
|
||||
payload_on: "Running"
|
||||
payload_off: "Not running"
|
||||
```
|
||||
|
@ -62,7 +62,7 @@ binary_sensor:
|
|||
- platform: command_line
|
||||
command: 'ping -c 1 rasplex.local | grep "1 received" | wc -l'
|
||||
name: 'is_rasplex_online'
|
||||
sensor_class: connectivity
|
||||
device_class: connectivity
|
||||
payload_on: 1
|
||||
payload_off: 0
|
||||
```
|
||||
|
@ -74,7 +74,7 @@ binary_sensor:
|
|||
platform: command_line
|
||||
name: Printer
|
||||
command: ping -W 1 -c 1 192.168.1.10 > /dev/null 2>&1 && echo success || echo fail
|
||||
sensor_class: connectivity
|
||||
device_class: connectivity
|
||||
payload_on: "success"
|
||||
payload_off: "fail"
|
||||
```
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue