Update link (#2722)
This commit is contained in:
parent
ba42dad3c7
commit
c87e55eec1
27 changed files with 87 additions and 82 deletions
|
@ -32,7 +32,7 @@ Configuration variables:
|
|||
- **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.
|
||||
- **value_template** (*Optional*): Defines a [template](/docs/configuration/templating/#processing-incoming-data) to extract a value from the payload.
|
||||
|
||||
## {% linkable_title Examples %}
|
||||
|
||||
|
@ -71,12 +71,12 @@ An alternative solution could look like this:
|
|||
|
||||
```yaml
|
||||
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
|
||||
device_class: connectivity
|
||||
payload_on: "success"
|
||||
payload_off: "fail"
|
||||
- platform: command_line
|
||||
name: Printer
|
||||
command: ping -W 1 -c 1 192.168.1.10 > /dev/null 2>&1 && echo success || echo fail
|
||||
device_class: connectivity
|
||||
payload_on: "success"
|
||||
payload_off: "fail"
|
||||
```
|
||||
|
||||
Consider to use the [`ping` sensor ](/components/binary_sensor.ping/) as an alternative to the samples above.
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue