mirror of
https://github.com/home-assistant/home-assistant.io.git
synced 2025-07-10 02:46:53 +00:00
Add sensor_class
This commit is contained in:
parent
518bc33db9
commit
b72a905c97
@ -23,6 +23,7 @@ binary_sensor:
|
|||||||
platform: command_line
|
platform: command_line
|
||||||
command: cat /proc/sys/net/ipv4/ip_forward
|
command: cat /proc/sys/net/ipv4/ip_forward
|
||||||
name: 'IP4 forwarding'
|
name: 'IP4 forwarding'
|
||||||
|
sensor_class: opening
|
||||||
payload_on: "1"
|
payload_on: "1"
|
||||||
payload_off: "0"
|
payload_off: "0"
|
||||||
value_template: '{% raw %}{{ value.x }}{% endraw %}'
|
value_template: '{% raw %}{{ value.x }}{% endraw %}'
|
||||||
@ -32,6 +33,7 @@ Configuration variables:
|
|||||||
|
|
||||||
- **command** (*Required*): The action to take to get the value.
|
- **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.
|
- **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.
|
||||||
- **payload_on** (*Optional*): The payload that represents enabled state. Default is "ON".
|
- **payload_on** (*Optional*): The payload that represents enabled state. Default is "ON".
|
||||||
- **payload_off** (*Optional*): The payload that represents disabled state. Default is "OFF".
|
- **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.
|
- **value_template** (*Optional*): Defines a [template](/topics/templating/) to extract a value from the payload.
|
||||||
|
Loading…
x
Reference in New Issue
Block a user