Document template image (#27970)

Co-authored-by: Joost Lekkerkerker <joostlek@outlook.com>
This commit is contained in:
Erik Montnemery 2023-06-26 17:28:08 +02:00 committed by GitHub
parent bfd652e92d
commit e9b006a4e0
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23

View File

@ -31,7 +31,7 @@ ha_integration_type: integration
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, buttons, numbers and selects are covered on this page. For other types, please see the specific pages:
Sensors, binary (on/off) sensors, buttons, images, 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/)
@ -42,11 +42,11 @@ Sensors, binary (on/off) sensors, buttons, numbers and selects are covered on th
- [Vacuum](/integrations/vacuum.template/)
- [Weather](/integrations/weather.template/)
Sensor, binary sensor, button, 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/select entities and can contain an optional update trigger.
Sensor, binary sensor, button, image, 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/select entities and can contain an optional update trigger.
_For old sensor/binary sensor configuration format, [see below](#legacy-binary-sensor-configuration-format)._
## State-based template binary sensors, buttons, numbers, selects and sensors
## State-based template binary sensors, buttons, images, numbers, selects and sensors
Template entities will by default update as soon as any of the referenced data in the template updates.
@ -69,7 +69,7 @@ template:
{% endraw %}
## Trigger-based template binary sensors, buttons, numbers, selects and sensors
## Trigger-based template binary sensors, buttons, images, numbers, selects and sensors
If you want more control over when an entity updates, you can define a trigger. Triggers follow the same format and work exactly the same as [triggers in automations][trigger-doc]. This feature is a great way to create entities based on webhook data ([example](#trigger-based-sensor-and-binary-sensor-storing-webhook-information)), or update entities based on a schedule.
@ -233,7 +233,21 @@ button:
description: Defines actions to run to press the button.
required: true
type: action
"[all sensor, binary sensor, button, number, select entities]":
image:
description: List of images
required: true
type: map
keys:
url:
description: The URL on which the image is served.
required: true
type: template
verify_ssl:
description: Enable or disable SSL certificate verification. Set to false to use an http-only URL, or you have a self-signed SSL certificate and havent installed the CA certificate to enable verification.
required: false
type: boolean
default: true
"[all sensor, binary sensor, button, image, number, select entities]":
description: Fields that can be used above for sensors, binary sensors, buttons, numbers, and selects.
required: false
type: map