Add UI config for sensor & template sensor (#28965)

Co-authored-by: Franck Nijhof <frenck@frenck.nl>
This commit is contained in:
sebcaps 2023-09-26 09:54:07 +02:00 committed by GitHub
parent 52f7eb9621
commit 1d2bbbf538
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23

View File

@ -49,10 +49,20 @@ Sensors, binary (on/off) sensors, buttons, images, numbers and selects are cover
- [Vacuum](/integrations/vacuum.template/) - [Vacuum](/integrations/vacuum.template/)
- [Weather](/integrations/weather.template/) - [Weather](/integrations/weather.template/)
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. Sensor and binary sensor can be configured using [UI](#ui-configuration) or [YAML](#yaml-configuration) file.
Button, image, number, and select template entities are defined in your YAML configuration files 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)._ _For old sensor/binary sensor configuration format, [see below](#legacy-binary-sensor-configuration-format)._
# UI configuration
Sensor template and binary sensor template can be configured using the user interface at **{% my helpers title="Settings > Devices & Services > Helpers" %}**. Select the **+ Add helper** button and then select the **{% my config_flow_start domain=input_datetime title="Template" %}** helper.
To be able to add **{% my helpers title="Helpers" %}** via the user interface, you should have `default_config:` in your `configuration.yaml`. It should already be there by default unless you removed it.
# YAML configuration
## State-based template binary sensors, buttons, images, 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. Template entities will by default update as soon as any of the referenced data in the template updates.