Merge branch 'current' into next

This commit is contained in:
Franck Nijhof 2020-06-01 23:32:32 +02:00
commit c966ae2607
No known key found for this signature in database
GPG Key ID: D62583BA8AB11CA3
4 changed files with 13 additions and 1 deletions

View File

@ -389,6 +389,15 @@ automation:
event: enter # or "leave" event: enter # or "leave"
``` ```
### Device triggers
Device triggers encompass a set of events that are defined by an integration. This includes, for example, state changes of sensors as well as button events from remotes.
[MQTT device triggers](/integrations/device_trigger.mqtt/) are set up through autodiscovery.
In contrast to state triggers, device triggers are tied to a device and not necessarily an entity.
To use a device trigger, set up an automation through the browser frontend.
If you would like to use a device trigger for an automation that is not managed through the browser frontend, you can copy the YAML from the trigger widget in the frontend and paste it into your automation's trigger list.
### Multiple triggers ### Multiple triggers
It is possible to specify multiple triggers for the same rule. To do so just prefix the first line of each trigger with a dash (-) and indent the next lines accordingly. Whenever one of the triggers fires, [processing](#what-are-triggers) of your automation rule begins. It is possible to specify multiple triggers for the same rule. To do so just prefix the first line of each trigger with a dash (-) and indent the next lines accordingly. Whenever one of the triggers fires, [processing](#what-are-triggers) of your automation rule begins.

View File

@ -161,7 +161,7 @@ weather_alert_tts:
sequence: sequence:
- service: tts.amazon_polly_say - service: tts.amazon_polly_say
data_template: data_template:
message: "{{ states('sensor.warnings') }} in effect. {{ state_attr('sensor.warnings', 'alert detail') }}" message: "{{ states('sensor.warnings') }} in effect."
``` ```
{% endraw %} {% endraw %}

View File

@ -159,6 +159,7 @@ The example below shows a full configuration for a switch.
# Example configuration.yaml entry # Example configuration.yaml entry
switch: switch:
- platform: mqtt - platform: mqtt
unique_id: bedroom_switch
name: "Bedroom Switch" name: "Bedroom Switch"
state_topic: "home/bedroom/switch1" state_topic: "home/bedroom/switch1"
command_topic: "home/bedroom/switch1/set" command_topic: "home/bedroom/switch1/set"

View File

@ -228,6 +228,8 @@ The following table shows the units of measurement for each attribute:
8. You should now see 2 extra options listed in English, this means you enabled developer mode. [if not, try all steps again!]. 8. You should now see 2 extra options listed in English, this means you enabled developer mode. [if not, try all steps again!].
9. Under "Hub info" there is quite some text in JSON format, this includes the "token" that you need. 9. Under "Hub info" there is quite some text in JSON format, this includes the "token" that you need.
Note: If you have multiple devices needing a token, e.g., Xiaomi Mi Robot Vacuum and a Xiaomi IR Remote, the above method may not work. The Xiaomi Home app will display a token, though it isn't the correct one. The alternative method using "Mi Home v5.4.49" will provide the correct token.
### Alternative methods ### Alternative methods
<div class='note'> <div class='note'>