mirror of
https://github.com/home-assistant/home-assistant.io.git
synced 2025-07-23 09:17:06 +00:00
Add availability config option to command_line (#30282)
* Add availability config option to command_line * Apply suggestions from code review Co-authored-by: Dave T <17680170+davet2001@users.noreply.github.com> --------- Co-authored-by: Dave T <17680170+davet2001@users.noreply.github.com>
This commit is contained in:
parent
79adad22e7
commit
9a18cc02d6
@ -80,6 +80,11 @@ command_line:
|
|||||||
description: Defines a [template](/docs/configuration/templating/#processing-incoming-data) to extract a value from the payload.
|
description: Defines a [template](/docs/configuration/templating/#processing-incoming-data) to extract a value from the payload.
|
||||||
required: false
|
required: false
|
||||||
type: string
|
type: string
|
||||||
|
availability:
|
||||||
|
description: Defines a template to get the `available` state of the entity. If the template either fails to render or returns `True`, `"1"`, `"true"`, `"yes"`, `"on"`, `"enable"`, or a non-zero number, the entity will be `available`. If the template returns any other value, the entity will be `unavailable`. If not configured, the entity will always be `available`. Note that string comparisons are not case sensitive; `"TrUe"` and `"yEs"` are allowed.
|
||||||
|
required: false
|
||||||
|
type: template
|
||||||
|
default: true
|
||||||
scan_interval:
|
scan_interval:
|
||||||
description: Define time in seconds between each update.
|
description: Define time in seconds between each update.
|
||||||
required: false
|
required: false
|
||||||
@ -126,6 +131,11 @@ command_line:
|
|||||||
description: if specified, `command_state` will ignore the result code of the command but the template evaluating will indicate the position of the cover. For example, if your `command_state` returns a string "open", using `value_template` as in the example configuration above will allow you to translate that into the valid state `100`.
|
description: if specified, `command_state` will ignore the result code of the command but the template evaluating will indicate the position of the cover. For example, if your `command_state` returns a string "open", using `value_template` as in the example configuration above will allow you to translate that into the valid state `100`.
|
||||||
required: false
|
required: false
|
||||||
type: template
|
type: template
|
||||||
|
availability:
|
||||||
|
description: Defines a template to get the `available` state of the entity. If the template either fails to render or returns `True`, `"1"`, `"true"`, `"yes"`, `"on"`, `"enable"`, or a non-zero number, the entity will be `available`. If the template returns any other value, the entity will be `unavailable`. If not configured, the entity will always be `available`. Note that string comparisons are not case sensitive; `"TrUe"` and `"yEs"` are allowed.
|
||||||
|
required: false
|
||||||
|
type: template
|
||||||
|
default: true
|
||||||
scan_interval:
|
scan_interval:
|
||||||
description: Define time in seconds between each update.
|
description: Define time in seconds between each update.
|
||||||
required: false
|
required: false
|
||||||
@ -189,6 +199,11 @@ command_line:
|
|||||||
description: "Defines a [template](/docs/configuration/templating/#processing-incoming-data) to extract a value from the payload."
|
description: "Defines a [template](/docs/configuration/templating/#processing-incoming-data) to extract a value from the payload."
|
||||||
required: false
|
required: false
|
||||||
type: string
|
type: string
|
||||||
|
availability:
|
||||||
|
description: Defines a template to get the `available` state of the entity. If the template either fails to render or returns `True`, `"1"`, `"true"`, `"yes"`, `"on"`, `"enable"`, or a non-zero number, the entity will be `available`. If the template returns any other value, the entity will be `unavailable`. If not configured, the entity will always be `available`. Note that string comparisons are not case sensitive; `"TrUe"` and `"yEs"` are allowed.
|
||||||
|
required: false
|
||||||
|
type: template
|
||||||
|
default: true
|
||||||
device_class:
|
device_class:
|
||||||
description: Sets the class of the device, changing the device state and icon that is displayed on the UI (see below). It does not set the `unit_of_measurement`.
|
description: Sets the class of the device, changing the device state and icon that is displayed on the UI (see below). It does not set the `unit_of_measurement`.
|
||||||
required: false
|
required: false
|
||||||
@ -250,6 +265,11 @@ command_line:
|
|||||||
description: "If specified, `command_state` will ignore the result code of the command but the template evaluating to `true` will indicate the switch is on."
|
description: "If specified, `command_state` will ignore the result code of the command but the template evaluating to `true` will indicate the switch is on."
|
||||||
required: false
|
required: false
|
||||||
type: string
|
type: string
|
||||||
|
availability:
|
||||||
|
description: Defines a template to get the `available` state of the entity. If the template either fails to render or returns `True`, `"1"`, `"true"`, `"yes"`, `"on"`, `"enable"`, or a non-zero number, the entity will be `available`. If the template returns any other value, the entity will be `unavailable`. If not configured, the entity will always be `available`. Note that string comparisons are not case sensitive; `"TrUe"` and `"yEs"` are allowed.
|
||||||
|
required: false
|
||||||
|
type: template
|
||||||
|
default: true
|
||||||
scan_interval:
|
scan_interval:
|
||||||
description: Define time in seconds between each update.
|
description: Define time in seconds between each update.
|
||||||
required: false
|
required: false
|
||||||
|
Loading…
x
Reference in New Issue
Block a user