mirror of
https://github.com/home-assistant/home-assistant.io.git
synced 2025-07-08 18:06:54 +00:00
Document template.select platform (#19062)
Co-authored-by: Franck Nijhof <git@frenck.dev>
This commit is contained in:
parent
d942acf19b
commit
2cf5f81d03
@ -11,7 +11,6 @@ ha_codeowners:
|
||||
- '@home-assistant/core'
|
||||
- '@PhracturedBlue'
|
||||
- '@tetienne'
|
||||
- '@home-assistant/core'
|
||||
ha_domain: template
|
||||
ha_platforms:
|
||||
- alarm_control_panel
|
||||
@ -21,6 +20,7 @@ ha_platforms:
|
||||
- light
|
||||
- lock
|
||||
- number
|
||||
- select
|
||||
- sensor
|
||||
- switch
|
||||
- vacuum
|
||||
@ -29,7 +29,7 @@ ha_platforms:
|
||||
|
||||
The `template` integration allows creating entities which derive their values from other data. This is done by specifying [templates](/docs/configuration/templating/) for properties of an entity, like the name or the state.
|
||||
|
||||
Sensors, binary (on/off) sensors, and numbers are covered on this page. For other types, please see the specific pages:
|
||||
Sensors, binary (on/off) sensors, numbers and selects are covered on this page. For other types, please see the specific pages:
|
||||
|
||||
- [Alarm Control Panel](/integrations/alarm_control_panel.template/)
|
||||
- [Cover](/integrations/cover.template/)
|
||||
@ -40,7 +40,7 @@ Sensors, binary (on/off) sensors, and numbers are covered on this page. For othe
|
||||
- [Vacuum](/integrations/vacuum.template/)
|
||||
- [Weather](/integrations/weather.template/)
|
||||
|
||||
Sensor, binary sensor, and number template entities are defined in your YAML configuration files, directly under the `template:` key and cannot be configured via the UI. You can define multiple configuration blocks as a list. Each block defines sensor/binary sensor/number entities and can contain an optional update trigger.
|
||||
Sensor, binary sensor, number and select template entities are defined in your YAML configuration files, directly under the `template:` key and cannot be configured via the UI. You can define multiple configuration blocks as a list. Each block defines sensor/binary sensor/number entities and can contain an optional update trigger.
|
||||
|
||||
_For old sensor/binary sensor configuration format, [see below](#legacy-binary-sensor-configuration-format)._
|
||||
|
||||
@ -201,7 +201,29 @@ number:
|
||||
required: false
|
||||
type: boolean
|
||||
default: false
|
||||
"[all sensor, binary sensor, number entities]":
|
||||
select:
|
||||
description: List of selects
|
||||
required: true
|
||||
type: map
|
||||
keys:
|
||||
state:
|
||||
description: Template for the select's current value.
|
||||
required: true
|
||||
type: template
|
||||
select_option:
|
||||
description: Defines an action to run to select an option from the `options` list.
|
||||
required: true
|
||||
type: action
|
||||
options:
|
||||
description: Template for the select's available options.
|
||||
required: true
|
||||
type: template
|
||||
optimistic:
|
||||
description: Flag that defines if select works in optimistic mode.
|
||||
required: false
|
||||
type: boolean
|
||||
default: false
|
||||
"[all sensor, binary sensor, number, select entities]":
|
||||
description: Fields that can be used above for sensors, binary sensors, and numbers.
|
||||
required: false
|
||||
type: map
|
||||
@ -211,11 +233,11 @@ number:
|
||||
required: false
|
||||
type: template
|
||||
unique_id:
|
||||
description: "An ID that uniquely identifies this sensor. Will be combined with the unique ID of the configuration block if available. This allows changing the `name`, `icon` and `entity_id` from the web interface."
|
||||
description: An ID that uniquely identifies this sensor. Will be combined with the unique ID of the configuration block if available. This allows changing the `name`, `icon` and `entity_id` from the web interface.
|
||||
required: false
|
||||
type: string
|
||||
availability:
|
||||
description: "Defines a template to get the `available` state of the component. If the template returns `true`, the device is `available`. If the template returns any other value, the device will be `unavailable`. If not configured, the component will always be `available`."
|
||||
description: Defines a template to get the `available` state of the component. If the template returns `true`, the device is `available`. If the template returns any other value, the device will be `unavailable`. If not configured, the component will always be `available`.
|
||||
required: false
|
||||
type: template
|
||||
default: true
|
||||
|
Loading…
x
Reference in New Issue
Block a user