mirror of
https://github.com/home-assistant/home-assistant.io.git
synced 2025-07-23 09:17:06 +00:00
Merge branch 'current' into next
This commit is contained in:
commit
c966ae2607
@ -389,6 +389,15 @@ automation:
|
||||
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
|
||||
|
||||
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.
|
||||
|
@ -161,7 +161,7 @@ weather_alert_tts:
|
||||
sequence:
|
||||
- service: tts.amazon_polly_say
|
||||
data_template:
|
||||
message: "{{ states('sensor.warnings') }} in effect. {{ state_attr('sensor.warnings', 'alert detail') }}"
|
||||
message: "{{ states('sensor.warnings') }} in effect."
|
||||
```
|
||||
{% endraw %}
|
||||
|
||||
|
@ -159,6 +159,7 @@ The example below shows a full configuration for a switch.
|
||||
# Example configuration.yaml entry
|
||||
switch:
|
||||
- platform: mqtt
|
||||
unique_id: bedroom_switch
|
||||
name: "Bedroom Switch"
|
||||
state_topic: "home/bedroom/switch1"
|
||||
command_topic: "home/bedroom/switch1/set"
|
||||
|
@ -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!].
|
||||
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
|
||||
|
||||
<div class='note'>
|
||||
|
Loading…
x
Reference in New Issue
Block a user