From 1c4d09d5d53b20b79c24a1bea3f187eb6303c8e3 Mon Sep 17 00:00:00 2001 From: lich Date: Fri, 13 Jul 2018 15:58:56 +0800 Subject: [PATCH 1/2] Customizable command timeout --- source/_components/sensor.command_line.markdown | 1 + 1 file changed, 1 insertion(+) diff --git a/source/_components/sensor.command_line.markdown b/source/_components/sensor.command_line.markdown index 5cc0b4d9eaaa..ac5b78e301d7 100644 --- a/source/_components/sensor.command_line.markdown +++ b/source/_components/sensor.command_line.markdown @@ -32,6 +32,7 @@ Configuration variables: - **unit_of_measurement** (*Optional*): Defines the unit of measurement of the sensor, if any. - **value_template** (*Optional*): Defines a [template](/docs/configuration/templating/#processing-incoming-data) to extract a value from the payload. - **scan_interval** (*Optional*): Defines number of seconds for polling interval (defaults to 60 seconds). +- **command_timeout** (*Optional*): Defines number of seconds for command timeout (defaults to 15 seconds). ## {% linkable_title Examples %} From faf8e5ecf78c610fa800a43cfc1bd6fb82067040 Mon Sep 17 00:00:00 2001 From: lich Date: Sun, 15 Jul 2018 12:02:15 +0800 Subject: [PATCH 2/2] update the binary_sensor.command_line --- source/_components/binary_sensor.command_line.markdown | 9 +++++---- 1 file changed, 5 insertions(+), 4 deletions(-) diff --git a/source/_components/binary_sensor.command_line.markdown b/source/_components/binary_sensor.command_line.markdown index 25fb0c03302b..93769da97299 100644 --- a/source/_components/binary_sensor.command_line.markdown +++ b/source/_components/binary_sensor.command_line.markdown @@ -33,7 +33,8 @@ Configuration variables: - **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](/docs/configuration/templating/#processing-incoming-data) to extract a value from the payload. -- **scan_interval** (*Optional*): Defines number of seconds for polling interval (defaults to 60 seconds). +- **scan_interval** (*Optional*): Defines number of seconds for polling interval (defaults to 60 seconds). +- **command_timeout** (*Optional*): Defines number of seconds for command timeout (defaults to 15 seconds). ## {% linkable_title Examples %} @@ -87,10 +88,10 @@ Consider to use the [`ping` sensor ](/components/binary_sensor.ping/) as an alte The services running is listed in `/etc/systemd/system` and can be checked with the `systemctl` command: ``` -$ systemctl is-active home-assistant@rock64.service +$ systemctl is-active home-assistant@rock64.service active $ sudo service home-assistant@rock64.service stop -$ systemctl is-active home-assistant@rock64.service +$ systemctl is-active home-assistant@rock64.service inactive ``` @@ -104,4 +105,4 @@ binary_sensor: payload_off: 'inactive' ``` -Note: Use single quotes! +Note: Use single quotes!