Improve YAML styling for all automation examples (#34932)

This commit is contained in:
Franck Nijhof 2024-09-26 12:39:04 +02:00
parent d118c3e072
commit 8b9ad61e42
No known key found for this signature in database
GPG Key ID: D62583BA8AB11CA3
141 changed files with 1920 additions and 1966 deletions

View File

@ -48,7 +48,7 @@ automation:
- trigger: state - trigger: state
entity_id: sensor.office_motion_sensor entity_id: sensor.office_motion_sensor
to: "on" to: "on"
condition: "{{ state_attr('sun.sun', 'elevation') < 4 }}" conditions: "{{ state_attr('sun.sun', 'elevation') < 4 }}"
actions: actions:
- action: scene.turn_on - action: scene.turn_on
target: target:

View File

@ -219,10 +219,10 @@ automation 2:
- trigger: mqtt - trigger: mqtt
topic: "/notify/+" topic: "/notify/+"
actions: actions:
action: > - action: >
notify.{{ trigger.topic.split('/')[-1] }} notify.{{ trigger.topic.split('/')[-1] }}
data: data:
message: "{{ trigger.payload }}" message: "{{ trigger.payload }}"
automation 3: automation 3:
triggers: triggers:

View File

@ -277,10 +277,10 @@ actions:
- action: light.turn_on - action: light.turn_on
target: !input light_target target: !input light_target
- wait_for_trigger: - wait_for_trigger:
trigger: state - trigger: state
entity_id: !input motion_entity entity_id: !input motion_entity
from: "on" from: "on"
to: "off" to: "off"
- delay: !input no_motion_wait - delay: !input no_motion_wait
- action: light.turn_off - action: light.turn_off
target: !input light_target target: !input light_target

View File

@ -45,18 +45,18 @@ The automation we're going to use in this tutorial controls a light based on a m
```yaml ```yaml
triggers: triggers:
trigger: state - trigger: state
entity_id: binary_sensor.motion_kitchen entity_id: binary_sensor.motion_kitchen
actions: actions:
action: > - action: >
{% if trigger.to_state.state == "on" %} {% if trigger.to_state.state == "on" %}
light.turn_on light.turn_on
{% else %} {% else %}
light.turn_off light.turn_off
{% endif %} {% endif %}
target: target:
entity_id: light.kitchen entity_id: light.kitchen
``` ```
{% endraw %} {% endraw %}
@ -92,8 +92,8 @@ Configurable parts in blueprints are called [inputs](/docs/blueprint/schema/#blu
```yaml ```yaml
triggers: triggers:
trigger: state - trigger: state
entity_id: !input motion_sensor entity_id: !input motion_sensor
``` ```
For the light, we can offer some more flexibility. We want to allow the user to be able to define any device or area as the target. The `target` property in the action can contain references to areas, devices, and/or entities, so that's what we will use. For the light, we can offer some more flexibility. We want to allow the user to be able to define any device or area as the target. The `target` property in the action can contain references to areas, devices, and/or entities, so that's what we will use.
@ -104,13 +104,13 @@ Inputs are not limited to strings. They can contain complex objects too. So in t
```yaml ```yaml
actions: actions:
action: > - action: >
{% if trigger.to_state.state == "on" %} {% if trigger.to_state.state == "on" %}
light.turn_on light.turn_on
{% else %} {% else %}
light.turn_off light.turn_off
{% endif %} {% endif %}
target: !input target_light target: !input target_light
``` ```
{% endraw %} {% endraw %}

View File

@ -268,22 +268,22 @@ These work recursively. As an example using `!include_dir_list automation`, will
automation: automation:
- alias: "Automation 1" - alias: "Automation 1"
triggers: triggers:
trigger: state - trigger: state
entity_id: device_tracker.iphone entity_id: device_tracker.iphone
to: "home" to: "home"
actions: actions:
action: light.turn_on - action: light.turn_on
target: target:
entity_id: light.entryway entity_id: light.entryway
- alias: "Automation 2" - alias: "Automation 2"
triggers: triggers:
trigger: state - trigger: state
entity_id: device_tracker.iphone entity_id: device_tracker.iphone
from: "home" from: "home"
actions: actions:
action: light.turn_off - action: light.turn_off
target: target:
entity_id: light.entryway entity_id: light.entryway
``` ```
can be turned into: can be turned into:
@ -299,13 +299,13 @@ automation: !include_dir_list automation/presence/
```yaml ```yaml
alias: "Automation 1" alias: "Automation 1"
triggers: triggers:
trigger: state - trigger: state
entity_id: device_tracker.iphone entity_id: device_tracker.iphone
to: "home" to: "home"
actions: actions:
action: light.turn_on - action: light.turn_on
target: target:
entity_id: light.entryway entity_id: light.entryway
``` ```
`automation/presence/automation2.yaml` `automation/presence/automation2.yaml`
@ -313,13 +313,13 @@ actions:
```yaml ```yaml
alias: "Automation 2" alias: "Automation 2"
triggers: triggers:
trigger: state - trigger: state
entity_id: device_tracker.iphone entity_id: device_tracker.iphone
from: "home" from: "home"
actions: actions:
action: light.turn_off - action: light.turn_off
target: target:
entity_id: light.entryway entity_id: light.entryway
``` ```
It is important to note that each file must contain only **one** entry when using `!include_dir_list`. It is important to note that each file must contain only **one** entry when using `!include_dir_list`.

View File

@ -58,14 +58,14 @@ Scenes can be activated using the action `scene.turn_on` (there is no 'scene.tur
# Example automation # Example automation
automation: automation:
triggers: triggers:
trigger: state - trigger: state
entity_id: device_tracker.sweetheart entity_id: device_tracker.sweetheart
from: "not_home" from: "not_home"
to: "home" to: "home"
actions: actions:
action: scene.turn_on - action: scene.turn_on
target: target:
entity_id: scene.romantic entity_id: scene.romantic
``` ```
## Applying a scene without defining it ## Applying a scene without defining it
@ -76,21 +76,21 @@ With the `scene.apply` action you are able to apply a scene without first defini
# Example automation # Example automation
automation: automation:
triggers: triggers:
trigger: state - trigger: state
entity_id: device_tracker.sweetheart entity_id: device_tracker.sweetheart
from: "not_home" from: "not_home"
to: "home" to: "home"
actions: actions:
action: scene.apply - action: scene.apply
data: data:
entities: entities:
light.tv_back_light: light.tv_back_light:
state: "on" state: "on"
brightness: 100 brightness: 100
light.ceiling: off light.ceiling: off
media_player.sony_bravia_tv: media_player.sony_bravia_tv:
state: "on" state: "on"
source: HDMI 1 source: "HDMI 1"
``` ```
## Using scene transitions ## Using scene transitions
@ -105,16 +105,16 @@ light will transition to the scene in 2.5 seconds.
# Example automation # Example automation
automation: automation:
triggers: triggers:
trigger: state - trigger: state
entity_id: device_tracker.sweetheart entity_id: device_tracker.sweetheart
from: "not_home" from: "not_home"
to: "home" to: "home"
actions: actions:
action: scene.turn_on - action: scene.turn_on
target: target:
entity_id: scene.romantic entity_id: scene.romantic
data: data:
transition: 2.5 transition: 2.5
``` ```
Transitions are currently only support by lights, which in their turn, have Transitions are currently only support by lights, which in their turn, have

View File

@ -532,7 +532,6 @@ automation:
- condition: state - condition: state
entity_id: binary_sensor.something entity_id: binary_sensor.something
state: "off" state: "off"
mode: single
actions: actions:
- alias: "Repeat the sequence UNTIL the conditions are true" - alias: "Repeat the sequence UNTIL the conditions are true"
repeat: repeat:

View File

@ -20,15 +20,15 @@ Test multiple conditions in one condition statement. Passes if all embedded cond
```yaml ```yaml
conditions: conditions:
alias: "Paulus home AND temperature below 20" - alias: "Paulus home AND temperature below 20"
condition: and condition: and
conditions: conditions:
- condition: state - condition: state
entity_id: "device_tracker.paulus" entity_id: "device_tracker.paulus"
state: "home" state: "home"
- condition: numeric_state - condition: numeric_state
entity_id: "sensor.temperature" entity_id: "sensor.temperature"
below: 20 below: 20
``` ```
If you do not want to combine AND and OR conditions, you can list them sequentially. If you do not want to combine AND and OR conditions, you can list them sequentially.
@ -52,7 +52,7 @@ The AND condition also has a shorthand form. The following configuration works t
```yaml ```yaml
conditions: conditions:
alias: "Paulus home AND temperature below 20" alias: "Paulus home AND temperature below 20"
and: - and:
- condition: state - condition: state
entity_id: "device_tracker.paulus" entity_id: "device_tracker.paulus"
state: "home" state: "home"
@ -67,29 +67,29 @@ Test multiple conditions in one condition statement. Passes if any embedded cond
```yaml ```yaml
conditions: conditions:
alias: "Paulus home OR temperature below 20" - alias: "Paulus home OR temperature below 20"
condition: or condition: or
conditions: conditions:
- condition: state - condition: state
entity_id: "device_tracker.paulus" entity_id: "device_tracker.paulus"
state: "home" state: "home"
- condition: numeric_state - condition: numeric_state
entity_id: "sensor.temperature" entity_id: "sensor.temperature"
below: 20 below: 20
``` ```
The OR condition also has a shorthand form. The following configuration works the same as the one listed above: The OR condition also has a shorthand form. The following configuration works the same as the one listed above:
```yaml ```yaml
conditions: conditions:
alias: "Paulus home OR temperature below 20" - alias: "Paulus home OR temperature below 20"
or: or:
- condition: state - condition: state
entity_id: "device_tracker.paulus" entity_id: "device_tracker.paulus"
state: "home" state: "home"
- condition: numeric_state - condition: numeric_state
entity_id: "sensor.temperature" entity_id: "sensor.temperature"
below: 20 below: 20
``` ```
### Mixed AND and OR conditions ### Mixed AND and OR conditions
@ -99,26 +99,26 @@ This allows you to mix several AND and OR conditions together.
```yaml ```yaml
conditions: conditions:
condition: and - condition: and
conditions: conditions:
- condition: state - condition: state
entity_id: "device_tracker.paulus" entity_id: "device_tracker.paulus"
state: "home" state: "home"
- condition: or - condition: or
conditions: conditions:
- condition: state - condition: state
entity_id: sensor.weather_precip entity_id: sensor.weather_precip
state: "rain" state: "rain"
- condition: numeric_state - condition: numeric_state
entity_id: "sensor.temperature" entity_id: "sensor.temperature"
below: 20 below: 20
``` ```
Or in shorthand form: Or in shorthand form:
```yaml ```yaml
conditions: conditions:
and: - and:
- condition: state - condition: state
entity_id: "device_tracker.paulus" entity_id: "device_tracker.paulus"
state: "home" state: "home"
@ -137,15 +137,15 @@ Test multiple conditions in one condition statement. Passes if all embedded cond
```yaml ```yaml
conditions: conditions:
alias: "Paulus not home AND alarm not disarmed" - alias: "Paulus not home AND alarm not disarmed"
condition: not condition: not
conditions: conditions:
- condition: state - condition: state
entity_id: device_tracker.paulus entity_id: device_tracker.paulus
state: "home" state: "home"
- condition: state - condition: state
entity_id: alarm_control_panel.home_alarm entity_id: alarm_control_panel.home_alarm
state: disarmed state: "disarmed"
``` ```
The NOT condition also has a shorthand form. The following configuration works the same as the one listed above: The NOT condition also has a shorthand form. The following configuration works the same as the one listed above:
@ -170,11 +170,11 @@ If both `below` and `above` are specified, both tests have to pass.
```yaml ```yaml
conditions: conditions:
alias: "Temperature between 17 and 25 degrees" - alias: "Temperature between 17 and 25 degrees"
condition: numeric_state condition: numeric_state
entity_id: sensor.temperature entity_id: sensor.temperature
above: 17 above: 17
below: 25 below: 25
``` ```
You can optionally use a `value_template` to process the value of the state before testing it. You can optionally use a `value_template` to process the value of the state before testing it.
@ -183,12 +183,12 @@ You can optionally use a `value_template` to process the value of the state befo
```yaml ```yaml
conditions: conditions:
condition: numeric_state - condition: numeric_state
entity_id: sensor.temperature entity_id: sensor.temperature
above: 17 above: 17
below: 25 below: 25
# If your sensor value needs to be adjusted # If your sensor value needs to be adjusted
value_template: "{{ float(state.state) + 2 }}" value_template: "{{ float(state.state) + 2 }}"
``` ```
{% endraw %} {% endraw %}
@ -198,11 +198,11 @@ The condition will pass if **all** entities match the thresholds.
```yaml ```yaml
conditions: conditions:
condition: numeric_state - condition: numeric_state
entity_id: entity_id:
- sensor.kitchen_temperature - sensor.kitchen_temperature
- sensor.living_room_temperature - sensor.living_room_temperature
below: 18 below: 18
``` ```
Alternatively, the condition can test against a state attribute. Alternatively, the condition can test against a state attribute.
@ -210,11 +210,11 @@ The condition will pass if the attribute value of the entity matches the thresho
```yaml ```yaml
conditions: conditions:
condition: numeric_state - condition: numeric_state
entity_id: climate.living_room_thermostat entity_id: climate.living_room_thermostat
attribute: temperature attribute: temperature
above: 17 above: 17
below: 25 below: 25
``` ```
Number helpers (`input_number` entities), `number`, `sensor`, and `zone` entities Number helpers (`input_number` entities), `number`, `sensor`, and `zone` entities
@ -223,11 +223,11 @@ options to make the condition more dynamic.
```yaml ```yaml
conditions: conditions:
condition: numeric_state - condition: numeric_state
entity_id: climate.living_room_thermostat entity_id: climate.living_room_thermostat
attribute: temperature attribute: temperature
above: input_number.temperature_threshold_low above: input_number.temperature_threshold_low
below: input_number.temperature_threshold_high below: input_number.temperature_threshold_high
``` ```
## State condition ## State condition
@ -236,15 +236,15 @@ Tests if an entity has a specified state.
```yaml ```yaml
conditions: conditions:
alias: "Paulus not home for an hour and a bit" - alias: "Paulus not home for an hour and a bit"
condition: state condition: state
entity_id: device_tracker.paulus entity_id: device_tracker.paulus
state: "not_home" state: "not_home"
# optional: Evaluates to true only if state was this for last X time. # optional: Evaluates to true only if state was this for last X time.
for: for:
hours: 1 hours: 1
minutes: 10 minutes: 10
seconds: 5 seconds: 5
``` ```
It is also possible to test the condition against multiple entities at once. It is also possible to test the condition against multiple entities at once.
@ -252,11 +252,11 @@ The condition will pass if **all** entities match the state.
```yaml ```yaml
conditions: conditions:
condition: state - condition: state
entity_id: entity_id:
- light.kitchen - light.kitchen
- light.living_room - light.living_room
state: "on" state: "on"
``` ```
Instead of matching all, it is also possible if one of the entities matches. Instead of matching all, it is also possible if one of the entities matches.
@ -264,12 +264,12 @@ In the following example the condition will pass if **any** entity matches the s
```yaml ```yaml
conditions: conditions:
condition: state - condition: state
entity_id: entity_id:
- binary_sensor.motion_sensor_left - binary_sensor.motion_sensor_left
- binary_sensor.motion_sensor_right - binary_sensor.motion_sensor_right
match: any match: any
state: "on" state: "on"
``` ```
Testing if an entity is matching a set of possible conditions; Testing if an entity is matching a set of possible conditions;
@ -277,11 +277,11 @@ The condition will pass if the entity matches one of the states given.
```yaml ```yaml
conditions: conditions:
condition: state - condition: state
entity_id: alarm_control_panel.home entity_id: alarm_control_panel.home
state: state:
- "armed_away" - "armed_away"
- "armed_home" - "armed_home"
``` ```
Or, combine multiple entities with multiple states. In the following example, Or, combine multiple entities with multiple states. In the following example,
@ -289,13 +289,13 @@ both media players need to be either paused or playing for the condition to pass
```yaml ```yaml
conditions: conditions:
condition: state - condition: state
entity_id: entity_id:
- media_player.living_room - media_player.living_room
- media_player.kitchen - media_player.kitchen
state: state:
- "playing" - "playing"
- "paused" - "paused"
``` ```
Alternatively, the condition can test against a state attribute. Alternatively, the condition can test against a state attribute.
@ -303,10 +303,10 @@ The condition will pass if the attribute matches the given state.
```yaml ```yaml
conditions: conditions:
condition: state - condition: state
entity_id: climate.living_room_thermostat entity_id: climate.living_room_thermostat
attribute: fan_mode attribute: fan_mode
state: "auto" state: "auto"
``` ```
Finally, the `state` option accepts helper entities (also known as `input_*` Finally, the `state` option accepts helper entities (also known as `input_*`
@ -315,9 +315,9 @@ of the given helper entity.
```yaml ```yaml
conditions: conditions:
condition: state - condition: state
entity_id: alarm_control_panel.home entity_id: alarm_control_panel.home
state: input_select.guest_mode state: input_select.guest_mode
``` ```
You can also use templates in the `for` option. You can also use templates in the `for` option.
@ -326,12 +326,12 @@ You can also use templates in the `for` option.
```yaml ```yaml
conditions: conditions:
condition: state - condition: state
entity_id: device_tracker.paulus entity_id: device_tracker.paulus
state: "home" state: "home"
for: for:
minutes: "{{ states('input_number.lock_min')|int }}" minutes: "{{ states('input_number.lock_min')|int }}"
seconds: "{{ states('input_number.lock_sec')|int }}" seconds: "{{ states('input_number.lock_sec')|int }}"
``` ```
{% endraw %} {% endraw %}
@ -346,18 +346,18 @@ The sun state can be used to test if the sun has set or risen.
```yaml ```yaml
conditions: conditions:
alias: "Sun up" - alias: "Sun up"
condition: state # 'day' condition: from sunrise until sunset condition: state # 'day' condition: from sunrise until sunset
entity_id: sun.sun entity_id: sun.sun
state: "above_horizon" state: "above_horizon"
``` ```
```yaml ```yaml
conditions: conditions:
alias: "Sun down" - alias: "Sun down"
condition: state # from sunset until sunrise condition: state # from sunset until sunrise
entity_id: sun.sun entity_id: sun.sun
state: "below_horizon" state: "below_horizon"
``` ```
### Sun elevation condition ### Sun elevation condition
@ -371,12 +371,12 @@ For an in-depth explanation of sun elevation, see [sun elevation trigger][sun_el
```yaml ```yaml
conditions: conditions:
condition: and # 'twilight' condition: dusk and dawn, in typical locations - condition: and # 'twilight' condition: dusk and dawn, in typical locations
conditions: conditions:
- condition: template - condition: template
value_template: "{{ state_attr('sun.sun', 'elevation') < 0 }}" value_template: "{{ state_attr('sun.sun', 'elevation') < 0 }}"
- condition: template - condition: template
value_template: "{{ state_attr('sun.sun', 'elevation') > -6 }}" value_template: "{{ state_attr('sun.sun', 'elevation') > -6 }}"
``` ```
{% endraw %} {% endraw %}
@ -406,9 +406,9 @@ The sunset/sunrise conditions do not work in locations inside the polar circles,
This is an example of 1 hour offset before sunset: This is an example of 1 hour offset before sunset:
```yaml ```yaml
conditions: conditions:
condition: sun - condition: sun
after: sunset after: sunset
after_offset: "-01:00:00" after_offset: "-01:00:00"
``` ```
This is 'when dark' - equivalent to a state condition on `sun.sun` of `below_horizon`: This is 'when dark' - equivalent to a state condition on `sun.sun` of `below_horizon`:
@ -441,9 +441,9 @@ The template condition tests if the [given template][template] renders a value e
```yaml ```yaml
conditions: conditions:
alias: "Iphone battery above 50%" - alias: "Iphone battery above 50%"
condition: template condition: template
value_template: "{{ (state_attr('device_tracker.iphone', 'battery_level')|int) > 50 }}" value_template: "{{ (state_attr('device_tracker.iphone', 'battery_level')|int) > 50 }}"
``` ```
{% endraw %} {% endraw %}
@ -488,12 +488,12 @@ and [`not`](#not-condition) conditions:
```yaml ```yaml
conditions: conditions:
condition: or - condition: or
conditions: conditions:
- "{{ is_state('device_tracker.iphone', 'away') }}" - "{{ is_state('device_tracker.iphone', 'away') }}"
- condition: numeric_state - condition: numeric_state
entity_id: "sensor.temperature" entity_id: "sensor.temperature"
below: 20 below: 20
``` ```
{% endraw %} {% endraw %}
@ -540,15 +540,15 @@ The time condition can test if it is after a specified time, before a specified
```yaml ```yaml
conditions: conditions:
alias: "Time 15~02" - alias: "Time 15~02"
condition: time condition: time
# At least one of the following is required. # At least one of the following is required.
after: "15:00:00" after: "15:00:00"
before: "02:00:00" before: "02:00:00"
weekday: weekday:
- mon - mon
- wed - wed
- fri - fri
``` ```
Valid values for `weekday` are `mon`, `tue`, `wed`, `thu`, `fri`, `sat`, `sun`. Valid values for `weekday` are `mon`, `tue`, `wed`, `thu`, `fri`, `sat`, `sun`.
@ -587,31 +587,31 @@ The trigger condition can test if an automation was triggered by a certain trigg
```yaml ```yaml
conditions: conditions:
condition: trigger - condition: trigger
id: event_trigger id: event_trigger
``` ```
For a trigger identified by its index, both a string and integer is allowed: For a trigger identified by its index, both a string and integer is allowed:
```yaml ```yaml
conditions: conditions:
condition: trigger - condition: trigger
id: "0" id: "0"
``` ```
```yaml ```yaml
conditions: conditions:
condition: trigger - condition: trigger
id: 0 id: 0
``` ```
It is possible to give a list of triggers: It is possible to give a list of triggers:
```yaml ```yaml
conditions: conditions:
condition: trigger - condition: trigger
id: id:
- event_1_trigger - event_1_trigger
- event_2_trigger - event_2_trigger
``` ```
## Zone condition ## Zone condition
@ -620,10 +620,10 @@ Zone conditions test if an entity is in a certain zone. For zone automation to w
```yaml ```yaml
conditions: conditions:
alias: "Paulus at home" - alias: "Paulus at home"
condition: zone condition: zone
entity_id: device_tracker.paulus entity_id: device_tracker.paulus
zone: zone.home zone: zone.home
``` ```
It is also possible to test the condition against multiple entities at once. It is also possible to test the condition against multiple entities at once.
@ -631,11 +631,11 @@ The condition will pass if all entities are in the specified zone.
```yaml ```yaml
conditions: conditions:
condition: zone - condition: zone
entity_id: entity_id:
- device_tracker.frenck - device_tracker.frenck
- device_tracker.daphne - device_tracker.daphne
zone: zone.home zone: zone.home
``` ```
Testing if an entity is matching a set of possible zones; Testing if an entity is matching a set of possible zones;
@ -643,11 +643,11 @@ The condition will pass if the entity is in one of the zones.
```yaml ```yaml
conditions: conditions:
condition: zone - condition: zone
entity_id: device_tracker.paulus entity_id: device_tracker.paulus
state: state:
- zone.home - zone.home
- zone.work - zone.work
``` ```
Or, combine multiple entities with multiple zones. In the following example, Or, combine multiple entities with multiple zones. In the following example,
@ -701,10 +701,10 @@ For example:
```yaml ```yaml
# This condition will always pass, as it is disabled. # This condition will always pass, as it is disabled.
conditions: conditions:
enabled: false - enabled: false
condition: state condition: state
entity_id: sun.sun entity_id: sun.sun
state: "above_horizon" state: "above_horizon"
``` ```
Conditions can also be disabled based on limited templates or blueprint inputs. Conditions can also be disabled based on limited templates or blueprint inputs.

View File

@ -19,7 +19,8 @@ Perform the action `homeassistant.turn_on` on the {% term entity %} `group.livin
```yaml ```yaml
action: homeassistant.turn_on action: homeassistant.turn_on
entity_id: group.living_room target:
entity_id: group.living_room
``` ```
### Targeting areas and devices ### Targeting areas and devices
@ -51,7 +52,8 @@ You can also specify other parameters beside the entity to target. For example,
```yaml ```yaml
action: light.turn_on action: light.turn_on
entity_id: group.living_room target:
entity_id: group.living_room
data: data:
brightness: 120 brightness: 120
rgb_color: [255, 0, 0] rgb_color: [255, 0, 0]

View File

@ -105,8 +105,8 @@ If there is an automation that handles that event, it will be automatically trig
```yaml ```yaml
- alias: "Capture Event" - alias: "Capture Event"
triggers: triggers:
trigger: event - trigger: event
event_type: event_light_state_changed event_type: event_light_state_changed
actions: actions:
- action: notify.notify - action: notify.notify
data: data:

View File

@ -434,7 +434,7 @@ Using this {% term trigger %} in an {% term automation %} will allow you to dete
```yaml ```yaml
# Example automations.yaml entry # Example automations.yaml entry
alias: Doorbell Pressed alias: "Doorbell Pressed"
description: "Trigger when Amcrest Button Press Event Fires" description: "Trigger when Amcrest Button Press Event Fires"
triggers: triggers:
- trigger: event - trigger: event

View File

@ -147,11 +147,11 @@ In an [action](/getting-started/automation-action/) of your [automation setup](/
```yaml ```yaml
actions: actions:
action: androidtv.adb_command - action: androidtv.adb_command
target: target:
entity_id: media_player.androidtv_tv_living_room entity_id: media_player.androidtv_tv_living_room
data: data:
command: "HOME" command: "HOME"
``` ```
Available key commands include: Available key commands include:

View File

@ -148,16 +148,16 @@ Using the lock operation sensors, you can detect when a user operates a lock and
alias: "joe_doe_front_door_operate" alias: "joe_doe_front_door_operate"
description: John Doe locks or unlocks the Front Door description: John Doe locks or unlocks the Front Door
triggers: triggers:
- entity_id: sensor.front_door_operator - trigger: state
trigger: state entity_id: sensor.front_door_operator
to: John Doe to: "John Doe"
conditions: conditions:
- condition: template - condition: template
value_template: "{{ not state_attr('sensor.front_door_operator', 'remote') }}" value_template: "{{ not state_attr('sensor.front_door_operator', 'remote') }}"
actions: actions:
- data: {} - action: camera.turn_off
entity_id: camera.inside entity_id: camera.inside
action: camera.turn_off
``` ```
{% endraw %} {% endraw %}

View File

@ -82,19 +82,19 @@ See the example below for how an automation trigger translates to a message on t
automation: automation:
- alias: "Sunset Service Bus message" - alias: "Sunset Service Bus message"
triggers: triggers:
trigger: sun - trigger: sun
event: sunset event: sunset
actions: actions:
action: notify.test_queue - action: notify.test_queue
data:
message: "Sun is going down"
title: "Good evening"
data: data:
sun_direction: "Down" message: "Sun is going down"
custom_field: 123 title: "Good evening"
custom_object: data:
trigger_more: true sun_direction: "Down"
explain: "It's starting to get dark" custom_field: 123
custom_object:
trigger_more: true
explain: "It's starting to get dark"
``` ```
The message that can be retrieved from a queue or topic subscription: The message that can be retrieved from a queue or topic subscription:

View File

@ -52,11 +52,11 @@ at 3 AM:
automation: automation:
- alias: "Backup Home Assistant every night at 3 AM" - alias: "Backup Home Assistant every night at 3 AM"
triggers: triggers:
trigger: time - trigger: time
at: "03:00:00" at: "03:00:00"
actions: actions:
alias: "Create backup now" - alias: "Create backup now"
action: backup.create action: backup.create
``` ```
## Restoring a backup ## Restoring a backup

View File

@ -40,14 +40,14 @@ The requirement is that you have setup the [`xiaomi aqara` integration](/integra
```yaml ```yaml
- alias: "If there is motion and it's dark turn on the gateway light" - alias: "If there is motion and it's dark turn on the gateway light"
triggers: triggers:
trigger: state - trigger: state
entity_id: binary_sensor.motion_sensor_158d000xxxxxc2 entity_id: binary_sensor.motion_sensor_158d000xxxxxc2
from: "off" from: "off"
to: "on" to: "on"
conditions: conditions:
condition: numeric_state - condition: numeric_state
entity_id: sensor.illumination_34ce00xxxx11 entity_id: sensor.illumination_34ce00xxxx11
below: 300 below: 300
actions: actions:
- action: light.turn_on - action: light.turn_on
target: target:
@ -59,12 +59,12 @@ The requirement is that you have setup the [`xiaomi aqara` integration](/integra
entity_id: automation.MOTION_OFF entity_id: automation.MOTION_OFF
- alias: "If there no motion for 5 minutes turn off the gateway light" - alias: "If there no motion for 5 minutes turn off the gateway light"
triggers: triggers:
trigger: state - trigger: state
entity_id: binary_sensor.motion_sensor_158d000xxxxxc2 entity_id: binary_sensor.motion_sensor_158d000xxxxxc2
from: "on" from: "on"
to: "off" to: "off"
for: for:
minutes: 5 minutes: 5
actions: actions:
- action: light.turn_off - action: light.turn_off
target: target:
@ -79,36 +79,36 @@ The requirement is that you have setup the [`xiaomi aqara` integration](/integra
```yaml ```yaml
- alias: "If the window is open turn off the radiator" - alias: "If the window is open turn off the radiator"
triggers: triggers:
trigger: state - trigger: state
entity_id: binary_sensor.door_window_sensor_158d000xxxxxc2 entity_id: binary_sensor.door_window_sensor_158d000xxxxxc2
from: "off" from: "off"
to: "on" to: "on"
actions: actions:
action: climate.set_operation_mode - action: climate.set_operation_mode
target: target:
entity_id: climate.livingroom entity_id: climate.livingroom
data: data:
operation_mode: "Off" operation_mode: "Off"
- alias: "If the window is closed for 5 minutes turn on the radiator again" - alias: "If the window is closed for 5 minutes turn on the radiator again"
triggers: triggers:
trigger: state - trigger: state
entity_id: binary_sensor.door_window_sensor_158d000xxxxxc2 entity_id: binary_sensor.door_window_sensor_158d000xxxxxc2
from: "on" from: "on"
to: "off" to: "off"
for: for:
minutes: 5 minutes: 5
actions: actions:
action: climate.set_operation_mode - action: climate.set_operation_mode
target: target:
entity_id: climate.livingroom entity_id: climate.livingroom
data: data:
operation_mode: "Smart schedule" operation_mode: "Smart schedule"
- alias: "Notify if door is opened when away" - alias: "Notify if door is opened when away"
triggers: triggers:
trigger: state - trigger: state
entity_id: binary_sensor.door_window_sensor_15xxxxxxc9xx6b entity_id: binary_sensor.door_window_sensor_15xxxxxxc9xx6b
from: "off" from: "off"
to: "on" to: "on"
conditions: conditions:
- condition: state - condition: state
entity_id: group.family entity_id: group.family
@ -124,15 +124,15 @@ The requirement is that you have setup the [`xiaomi aqara` integration](/integra
```yaml ```yaml
- alias: "Send notification on fire alarm" - alias: "Send notification on fire alarm"
triggers: triggers:
trigger: state - trigger: state
entity_id: binary_sensor.smoke_sensor_158d0001574899 entity_id: binary_sensor.smoke_sensor_158d0001574899
from: "off" from: "off"
to: "on" to: "on"
actions: actions:
- action: notify.html5 - action: notify.html5
data: data:
title: Fire alarm! title: "Fire alarm!"
message: Fire/Smoke detected! message: "Fire/Smoke detected!"
- action: xiaomi_aqara.play_ringtone - action: xiaomi_aqara.play_ringtone
data: data:
gw_mac: xxxxxxxxxxxx gw_mac: xxxxxxxxxxxx
@ -147,14 +147,14 @@ The requirement is that you have setup the [`xiaomi aqara` integration](/integra
```yaml ```yaml
- alias: "Send notification on gas alarm" - alias: "Send notification on gas alarm"
triggers: triggers:
trigger: state - trigger: state
entity_id: binary_sensor.natgas_sensor_158dxxxxxxxxxx entity_id: binary_sensor.natgas_sensor_158dxxxxxxxxxx
from: "off" from: "off"
to: "on" to: "on"
actions: actions:
- action: notify.html5 - action: notify.html5
data: data:
title: Gas alarm! title: "Gas alarm!"
message: "Gas with a density of {{ state_attr('binary_sensor.natgas_sensor_158dxxxxxxxxxx', 'density') }} detected." message: "Gas with a density of {{ state_attr('binary_sensor.natgas_sensor_158dxxxxxxxxxx', 'density') }} detected."
``` ```
@ -167,39 +167,39 @@ As indicated in the table on top of this page there are 3 versions of the button
```yaml ```yaml
- alias: "Toggle dining light on single press" - alias: "Toggle dining light on single press"
triggers: triggers:
trigger: event - trigger: event
event_type: xiaomi_aqara.click event_type: xiaomi_aqara.click
event_data: event_data:
entity_id: binary_sensor.switch_158d000xxxxxc2 entity_id: binary_sensor.switch_158d000xxxxxc2
click_type: single click_type: single
actions: actions:
action: switch.toggle - action: switch.toggle
target: target:
entity_id: switch.wall_switch_left_158d000xxxxx01 entity_id: switch.wall_switch_left_158d000xxxxx01
- alias: "Toggle couch light on double click" - alias: "Toggle couch light on double click"
triggers: triggers:
trigger: event - trigger: event
event_type: xiaomi_aqara.click event_type: xiaomi_aqara.click
event_data: event_data:
entity_id: binary_sensor.switch_158d000xxxxxc2 entity_id: binary_sensor.switch_158d000xxxxxc2
click_type: double click_type: double
actions: actions:
action: switch.toggle - action: switch.toggle
target: target:
entity_id: switch.wall_switch_right_158d000xxxxx01 entity_id: switch.wall_switch_right_158d000xxxxx01
- alias: "Let a dog bark on long press" - alias: "Let a dog bark on long press"
triggers: triggers:
trigger: event - trigger: event
event_type: xiaomi_aqara.click event_type: xiaomi_aqara.click
event_data: event_data:
entity_id: binary_sensor.switch_158d000xxxxxc2 entity_id: binary_sensor.switch_158d000xxxxxc2
click_type: long_click_press click_type: long_click_press
actions: actions:
action: xiaomi_aqara.play_ringtone - action: xiaomi_aqara.play_ringtone
data: data:
gw_mac: xxxxxxxxxxxx gw_mac: xxxxxxxxxxxx
ringtone_id: 8 ringtone_id: 8
ringtone_vol: 8 ringtone_vol: 8
``` ```
#### Xiaomi Cube #### Xiaomi Cube
@ -209,11 +209,11 @@ Available events are `flip90`, `flip180`, `move`, `tap_twice`, `shake_air`, `swi
```yaml ```yaml
- alias: "Cube event flip90" - alias: "Cube event flip90"
triggers: triggers:
trigger: event - trigger: event
event_type: xiaomi_aqara.cube_action event_type: xiaomi_aqara.cube_action
event_data: event_data:
entity_id: binary_sensor.cube_15xxxxxxxxxxxx entity_id: binary_sensor.cube_15xxxxxxxxxxxx
action_type: flip90 action_type: flip90
actions: actions:
- action: light.turn_on - action: light.turn_on
target: target:
@ -222,11 +222,11 @@ Available events are `flip90`, `flip180`, `move`, `tap_twice`, `shake_air`, `swi
color_name: "springgreen" color_name: "springgreen"
- alias: "Cube event flip180" - alias: "Cube event flip180"
triggers: triggers:
trigger: event - trigger: event
event_type: xiaomi_aqara.cube_action event_type: xiaomi_aqara.cube_action
event_data: event_data:
entity_id: binary_sensor.cube_15xxxxxxxxxxxx entity_id: binary_sensor.cube_15xxxxxxxxxxxx
action_type: flip180 action_type: flip180
actions: actions:
- action: light.turn_on - action: light.turn_on
target: target:
@ -235,11 +235,11 @@ Available events are `flip90`, `flip180`, `move`, `tap_twice`, `shake_air`, `swi
color_name: "darkviolet" color_name: "darkviolet"
- alias: "Cube event move" - alias: "Cube event move"
triggers: triggers:
trigger: event - trigger: event
event_type: xiaomi_aqara.cube_action event_type: xiaomi_aqara.cube_action
event_data: event_data:
entity_id: binary_sensor.cube_15xxxxxxxxxxxx entity_id: binary_sensor.cube_15xxxxxxxxxxxx
action_type: move action_type: move
actions: actions:
- action: light.turn_on - action: light.turn_on
target: target:
@ -248,11 +248,11 @@ Available events are `flip90`, `flip180`, `move`, `tap_twice`, `shake_air`, `swi
color_name: "gold" color_name: "gold"
- alias: "Cube event tap_twice" - alias: "Cube event tap_twice"
triggers: triggers:
trigger: event - trigger: event
event_type: xiaomi_aqara.cube_action event_type: xiaomi_aqara.cube_action
event_data: event_data:
entity_id: binary_sensor.cube_15xxxxxxxxxxxx entity_id: binary_sensor.cube_15xxxxxxxxxxxx
action_type: tap_twice action_type: tap_twice
actions: actions:
- action: light.turn_on - action: light.turn_on
target: target:
@ -261,11 +261,11 @@ Available events are `flip90`, `flip180`, `move`, `tap_twice`, `shake_air`, `swi
color_name: "deepskyblue" color_name: "deepskyblue"
- alias: "Cube event shake_air" - alias: "Cube event shake_air"
triggers: triggers:
trigger: event - trigger: event
event_type: xiaomi_aqara.cube_action event_type: xiaomi_aqara.cube_action
event_data: event_data:
entity_id: binary_sensor.cube_15xxxxxxxxxxxx entity_id: binary_sensor.cube_15xxxxxxxxxxxx
action_type: shake_air action_type: shake_air
actions: actions:
- action: light.turn_on - action: light.turn_on
target: target:
@ -283,61 +283,61 @@ The Aqara Wireless Switch is available as single-key and double-key version. Eac
```yaml ```yaml
- alias: "Decrease brightness of the gateway light" - alias: "Decrease brightness of the gateway light"
triggers: triggers:
trigger: event - trigger: event
event_type: xiaomi_aqara.click event_type: xiaomi_aqara.click
event_data: event_data:
entity_id: binary_sensor.wall_switch_left_158xxxxxxxxx12 entity_id: binary_sensor.wall_switch_left_158xxxxxxxxx12
click_type: single click_type: single
actions: actions:
action: light.turn_on - action: light.turn_on
target: target:
entity_id: light.gateway_light_34xxxxxxxx13 entity_id: light.gateway_light_34xxxxxxxx13
data: data:
brightness: >- brightness: >-
{% if state_attr('light.gateway_light_34xxxxxxxx13', 'brightness') %} {% if state_attr('light.gateway_light_34xxxxxxxx13', 'brightness') %}
{% if state_attr('light.gateway_light_34xxxxxxxx13', 'brightness') - 60 >= 10 %} {% if state_attr('light.gateway_light_34xxxxxxxx13', 'brightness') - 60 >= 10 %}
{{state_attr('light.gateway_light_34xxxxxxxx13', 'brightness') - 60}} {{state_attr('light.gateway_light_34xxxxxxxx13', 'brightness') - 60}}
{% else %}
{{state_attr('light.gateway_light_34xxxxxxxx13', 'brightness')}}
{% endif %}
{% else %} {% else %}
{{state_attr('light.gateway_light_34xxxxxxxx13', 'brightness')}} 10
{% endif %} {% endif %}
{% else %}
10
{% endif %}
- alias: "Increase brightness of the gateway light" - alias: "Increase brightness of the gateway light"
triggers: triggers:
trigger: event - trigger: event
event_type: xiaomi_aqara.click event_type: xiaomi_aqara.click
event_data: event_data:
entity_id: binary_sensor.wall_switch_right_158xxxxxxxxx12 entity_id: binary_sensor.wall_switch_right_158xxxxxxxxx12
click_type: single click_type: single
actions: actions:
action: light.turn_on - action: light.turn_on
target: target:
entity_id: light.gateway_light_34xxxxxxxx13 entity_id: light.gateway_light_34xxxxxxxx13
data: data:
brightness: >- brightness: >-
{% if state_attr('light.gateway_light_34xxxxxxxx13', 'brightness') %} {% if state_attr('light.gateway_light_34xxxxxxxx13', 'brightness') %}
{% if state_attr('light.gateway_light_34xxxxxxxx13', 'brightness') + 60 <= 255 %} {% if state_attr('light.gateway_light_34xxxxxxxx13', 'brightness') + 60 <= 255 %}
{{state_attr('light.gateway_light_34xxxxxxxx13', 'brightness') + 60}} {{state_attr('light.gateway_light_34xxxxxxxx13', 'brightness') + 60}}
{% else %}
{{state_attr('light.gateway_light_34xxxxxxxx13', 'brightness')}}
{% endif %}
{% else %} {% else %}
{{state_attr('light.gateway_light_34xxxxxxxx13', 'brightness')}} 10
{% endif %} {% endif %}
{% else %}
10
{% endif %}
- alias: "Turn off the gateway light" - alias: "Turn off the gateway light"
triggers: triggers:
trigger: event - trigger: event
event_type: xiaomi_aqara.click event_type: xiaomi_aqara.click
event_data: event_data:
entity_id: binary_sensor.wall_switch_both_158xxxxxxxxx12 entity_id: binary_sensor.wall_switch_both_158xxxxxxxxx12
click_type: both click_type: both
actions: actions:
action: light.turn_off - action: light.turn_off
target: target:
entity_id: light.gateway_light_34xxxxxxxx13 entity_id: light.gateway_light_34xxxxxxxx13
``` ```
{% endraw %} {% endraw %}
@ -349,24 +349,24 @@ This automation toggles the living room lamp on vibration/tilt.
```yaml ```yaml
- alias: "Turn on Living Room Lamp on vibration" - alias: "Turn on Living Room Lamp on vibration"
triggers: triggers:
trigger: event - trigger: event
event_type: xiaomi_aqara.movement event_type: xiaomi_aqara.movement
event_data: event_data:
entity_id: binary_sensor.vibration_xxxx000000 entity_id: binary_sensor.vibration_xxxx000000
movement_type: vibrate movement_type: vibrate
actions: actions:
action: light.toggle - action: light.toggle
target: target:
entity_id: light.living_room_lamp entity_id: light.living_room_lamp
- alias: "Turn on Living Room Lamp on tilt" - alias: "Turn on Living Room Lamp on tilt"
triggers: triggers:
trigger: event - trigger: event
event_type: xiaomi_aqara.movement event_type: xiaomi_aqara.movement
event_data: event_data:
entity_id: binary_sensor.vibration_xxxx000000 entity_id: binary_sensor.vibration_xxxx000000
movement_type: tilt movement_type: tilt
actions: actions:
action: light.toggle - action: light.toggle
target: target:
entity_id: light.living_room_lamp entity_id: light.living_room_lamp
``` ```

View File

@ -133,16 +133,15 @@ This example automation will arm your blink sync module to detect motion on any
Here, this example assumes your blink module is named `My Sync Module` and that you have [device trackers](/integrations/device_tracker) set up for presence detection. Here, this example assumes your blink module is named `My Sync Module` and that you have [device trackers](/integrations/device_tracker) set up for presence detection.
```yaml ```yaml
- id: arm_blink_when_away - alias: "Arm Blink When Away"
alias: "Arm Blink When Away"
triggers: triggers:
trigger: state - trigger: state
entity_id: all entity_id: all
to: "not_home" to: "not_home"
actions: actions:
action: alarm_control_panel.alarm_arm_away - action: alarm_control_panel.alarm_arm_away
target: target:
entity_id: alarm_control_panel.blink_my_sync_module entity_id: alarm_control_panel.blink_my_sync_module
``` ```
### Disarm Blink when home ### Disarm Blink when home
@ -150,16 +149,15 @@ Here, this example assumes your blink module is named `My Sync Module` and that
Similar to the previous example, this automation will disarm blink when arriving home. Similar to the previous example, this automation will disarm blink when arriving home.
```yaml ```yaml
- id: disarm_blink_when_home - alias: "Disarm Blink When Home"
alias: "Disarm Blink When Home"
triggers: triggers:
trigger: state - trigger: state
entity_id: all entity_id: all
to: "home" to: "home"
actions: actions:
action: alarm_control_panel.alarm_disarm - action: alarm_control_panel.alarm_disarm
target: target:
entity_id: alarm_control_panel.blink_my_sync_module entity_id: alarm_control_panel.blink_my_sync_module
``` ```
### Save most recent video locally when motion detected ### Save most recent video locally when motion detected
@ -171,12 +169,11 @@ The following example assumes your camera's name (in the Blink app) is `My Camer
{% raw %} {% raw %}
```yaml ```yaml
- id: save_blink_video_on_motion - alias: "Save Blink Video on Motion"
alias: "Save Blink Video on Motion"
triggers: triggers:
trigger: state - trigger: state
entity_id: binary_sensor.blink_my_camera_motion_detected entity_id: binary_sensor.blink_my_camera_motion_detected
to: "on" to: "on"
actions: actions:
- action: blink.save_video - action: blink.save_video
target: target:
@ -200,8 +197,7 @@ The file will be saved to `/tmp/videos/YYYYMMDD_HHmmSS_MyCamera.mp4`.
The file name of the downloaded video file is not configurable. The file name of the downloaded video file is not configurable.
```yaml ```yaml
- id: save_recent_clips_from_my_camera - alias: "Save Recent Clips from My Camera"
alias: "Save Recent Clips from My Camera"
triggers: triggers:
- trigger: time_pattern - trigger: time_pattern
minutes: /3 minutes: /3

View File

@ -80,16 +80,16 @@ The name of the action is `notify.bmw_connected_drive_<your_vehicle>`.
```yaml ```yaml
... ...
actions: actions:
action: notify.bmw_connected_drive_<your_vehicle> - action: notify.bmw_connected_drive_<your_vehicle>
data:
message: The name of the POI # this is shown on the iDrive dashboard
data: data:
latitude: 48.177024 message: The name of the POI # this is shown on the iDrive dashboard
longitude: 11.559107 data:
street: Street name # Optional latitude: 48.177024
city: City name # Optional longitude: 11.559107
postal_code: Postal Code # Optional street: Street name # Optional
country: Country # Optional city: City name # Optional
postal_code: Postal Code # Optional
country: Country # Optional
``` ```
## Lock ## Lock

View File

@ -67,11 +67,11 @@ The **Bring** integration offers an action to send push notifications to the Bri
```yaml ```yaml
... ...
actions: actions:
action: bring.send_message - action: bring.send_message
target: target:
entity_id: todo.bring_shoppinglist entity_id: todo.bring_shoppinglist
data: data:
message: going_shopping message: going_shopping
``` ```
### Sending an urgent message notification ### Sending an urgent message notification
@ -81,10 +81,10 @@ Note that for the notification type `urgent_message` the attribute `item` is **r
```yaml ```yaml
... ...
actions: actions:
action: bring.send_message - action: bring.send_message
target: target:
entity_id: todo.bring_shoppinglist entity_id: todo.bring_shoppinglist
data: data:
message: urgent_message message: urgent_message
item: Cilantro item: Cilantro
``` ```

View File

@ -98,7 +98,7 @@ This example automation consists of:
{% raw %} {% raw %}
```yaml ```yaml
automation: automation:
- alias: Calendar notification - alias: "Calendar notification"
triggers: triggers:
- trigger: calendar - trigger: calendar
event: start event: start
@ -125,7 +125,7 @@ This example consists of:
{% raw %} {% raw %}
```yaml ```yaml
automation: automation:
- alias: Front Light Schedule - alias: "Front Light Schedule"
triggers: triggers:
- trigger: calendar - trigger: calendar
event: start event: start
@ -141,10 +141,12 @@ automation:
- "{{ trigger.event == 'start' }}" - "{{ trigger.event == 'start' }}"
then: then:
- action: light.turn_on - action: light.turn_on
entity_id: light.front target:
entity_id: light.front
else: else:
- action: light.turn_off - action: light.turn_off
entity_id: light.front target:
entity_id: light.front
``` ```
{% endraw %} {% endraw %}

View File

@ -75,11 +75,11 @@ For example, the following action in an automation would send an `hls` live stre
```yaml ```yaml
actions: actions:
action: camera.play_stream - action: camera.play_stream
target: target:
entity_id: camera.yourcamera entity_id: camera.yourcamera
data: data:
media_player: media_player.chromecast media_player: media_player.chromecast
``` ```
### Action `record` ### Action `record`
@ -103,11 +103,11 @@ For example, the following action in an automation would take a recording from "
```yaml ```yaml
actions: actions:
action: camera.record - action: camera.record
target: target:
entity_id: camera.yourcamera entity_id: camera.yourcamera
data: data:
filename: '/tmp/{{ entity_id.name }}_{{ now().strftime("%Y%m%d-%H%M%S") }}.mp4' filename: '/tmp/{{ entity_id.name }}_{{ now().strftime("%Y%m%d-%H%M%S") }}.mp4'
``` ```
{% endraw %} {% endraw %}
@ -129,11 +129,11 @@ For example, the following action in an automation would take a snapshot from "y
```yaml ```yaml
actions: actions:
action: camera.snapshot - action: camera.snapshot
target: target:
entity_id: camera.yourcamera entity_id: camera.yourcamera
data: data:
filename: '/tmp/yourcamera_{{ now().strftime("%Y%m%d-%H%M%S") }}.jpg' filename: '/tmp/yourcamera_{{ now().strftime("%Y%m%d-%H%M%S") }}.jpg'
``` ```
{% endraw %} {% endraw %}

View File

@ -39,11 +39,11 @@ Home Assistant has its own Cast application to show the Home Assistant UI on any
cast_downstairs_on_kitchen: cast_downstairs_on_kitchen:
alias: "Show Downstairs on kitchen" alias: "Show Downstairs on kitchen"
sequence: sequence:
- data: - action: cast.show_lovelace_view
data:
dashboard_path: lovelace-cast dashboard_path: lovelace-cast
entity_id: media_player.kitchen entity_id: media_player.kitchen
view_path: downstairs view_path: downstairs
action: cast.show_lovelace_view
``` ```
{% important %} {% important %}
@ -242,7 +242,8 @@ Optional:
'cast_bubbleupnp_to_my_chromecast': 'cast_bubbleupnp_to_my_chromecast':
alias: "Cast a video to My Chromecast using BubbleUPNP" alias: "Cast a video to My Chromecast using BubbleUPNP"
sequence: sequence:
- target: - action: media_player.play_media
target:
entity_id: media_player.my_chromecast entity_id: media_player.my_chromecast
data: data:
media_content_type: cast media_content_type: cast
@ -252,7 +253,6 @@ Optional:
"media_id": "http://commondatastorage.googleapis.com/gtv-videos-bucket/sample/BigBuckBunny.mp4", "media_id": "http://commondatastorage.googleapis.com/gtv-videos-bucket/sample/BigBuckBunny.mp4",
"media_type": "video/mp4" "media_type": "video/mp4"
}' }'
action: media_player.play_media
``` ```
### [NRK Radio](https://radio.nrk.no) ### [NRK Radio](https://radio.nrk.no)
@ -277,7 +277,8 @@ Example values to cast the item at <https://radio.nrk.no/podkast/tazte_priv/l_84
'cast_nrkradio_to_chromecast': 'cast_nrkradio_to_chromecast':
alias: "Cast NRK Radio to Chromecast" alias: "Cast NRK Radio to Chromecast"
sequence: sequence:
- target: - action: media_player.play_media
target:
entity_id: media_player.chromecast entity_id: media_player.chromecast
data: data:
media_content_type: cast media_content_type: cast
@ -286,7 +287,6 @@ Example values to cast the item at <https://radio.nrk.no/podkast/tazte_priv/l_84
"app_name": "nrkradio", "app_name": "nrkradio",
"media_id": "l_8457deb0-4f2c-4ef3-97de-b04f2c6ef314" "media_id": "l_8457deb0-4f2c-4ef3-97de-b04f2c6ef314"
}' }'
action: media_player.play_media
``` ```
### [NRK TV](https://tv.nrk.no) ### [NRK TV](https://tv.nrk.no)
@ -309,7 +309,8 @@ Example values to cast the item at <https://tv.nrk.no/serie/uti-vaar-hage/sesong
'cast_nrktv_to_chromecast': 'cast_nrktv_to_chromecast':
alias: "Cast NRK TV to Chromecast" alias: "Cast NRK TV to Chromecast"
sequence: sequence:
- target: - action: media_player.play_media
target:
entity_id: media_player.chromecast entity_id: media_player.chromecast
data: data:
media_content_type: cast media_content_type: cast
@ -318,7 +319,6 @@ Example values to cast the item at <https://tv.nrk.no/serie/uti-vaar-hage/sesong
"app_name": "nrktv", "app_name": "nrktv",
"media_id": "OUHA43000207" "media_id": "OUHA43000207"
}' }'
action: media_player.play_media
``` ```
### Plex ### Plex
@ -367,7 +367,8 @@ Example values to cast the item at <https://www.supla.fi/audio/3601824>
'cast_supla_to_my_chromecast': 'cast_supla_to_my_chromecast':
alias: "Cast supla to My Chromecast" alias: "Cast supla to My Chromecast"
sequence: sequence:
- target: - action: media_player.play_media
target:
entity_id: media_player.my_chromecast entity_id: media_player.my_chromecast
data: data:
media_content_type: cast media_content_type: cast
@ -376,7 +377,6 @@ Example values to cast the item at <https://www.supla.fi/audio/3601824>
"app_name": "supla", "app_name": "supla",
"media_id": "3601824" "media_id": "3601824"
}' }'
action: media_player.play_media
``` ```
### YouTube ### YouTube
@ -399,7 +399,8 @@ Optional:
'cast_youtube_to_my_chromecast': 'cast_youtube_to_my_chromecast':
alias: "Cast YouTube to My Chromecast" alias: "Cast YouTube to My Chromecast"
sequence: sequence:
- target: - action: media_player.play_media
target:
entity_id: media_player.my_chromecast entity_id: media_player.my_chromecast
data: data:
media_content_type: cast media_content_type: cast
@ -408,7 +409,6 @@ Optional:
"app_name": "youtube", "app_name": "youtube",
"media_id": "dQw4w9WgXcQ" "media_id": "dQw4w9WgXcQ"
}' }'
action: media_player.play_media
``` ```
## Troubleshooting automatic discovery ## Troubleshooting automatic discovery

View File

@ -69,9 +69,9 @@ Here are the automations for the above screenshot:
- trigger: webhook - trigger: webhook
webhook_id: build_failed webhook_id: build_failed
actions: actions:
action: notify.cisco_webex_teams_notify - action: notify.cisco_webex_teams_notify
data: data:
message: "<blockquote class=danger>Build 0.89.5 compile failed." message: "<blockquote class=danger>Build 0.89.5 compile failed."
# Rich Text Example 2. # Rich Text Example 2.
@ -82,20 +82,20 @@ Here are the automations for the above screenshot:
- trigger: webhook - trigger: webhook
webhook_id: build_unstable webhook_id: build_unstable
actions: actions:
action: notify.cisco_webex_teams_notify - action: notify.cisco_webex_teams_notify
data: data:
title: "<strong>Build 0.89.6 is unstable.</strong>" title: "<strong>Build 0.89.6 is unstable.</strong>"
message: "<blockquote class=warning>Version 0.89.6 failed verifications. message: "<blockquote class=warning>Version 0.89.6 failed verifications.
<ul> <ul>
<li> test_osx <li> test_osx
<li> test_win_lint <li> test_win_lint
<li>... and 4 more. <li>... and 4 more.
</ul> </ul>
<p><@personEmail:sparkbotjeeves@sparkbot.io></p> <p><@personEmail:sparkbotjeeves@sparkbot.io></p>
<p><small><i>View <a href='https://demo/testReport/'>Test Report</a></i></small><br></p> <p><small><i>View <a href='https://demo/testReport/'>Test Report</a></i></small><br></p>
" "
# Rich Text Example 3. # Rich Text Example 3.
# Show a title and multi-line message with a blue banner, # Show a title and multi-line message with a blue banner,
@ -105,19 +105,19 @@ Here are the automations for the above screenshot:
- trigger: webhook - trigger: webhook
webhook_id: build_passed webhook_id: build_passed
actions: actions:
action: notify.cisco_webex_teams_notify - action: notify.cisco_webex_teams_notify
data: data:
title: "<strong>✅ Version 0.89.7 passed all tests and deployed to production!</strong>" title: "<strong>✅ Version 0.89.7 passed all tests and deployed to production!</strong>"
message: "<blockquote class=info>Version 0.89.7 passed all verifications. message: "<blockquote class=info>Version 0.89.7 passed all verifications.
<ul> <ul>
<li> test_cov <li> test_cov
<li> test_osx <li> test_osx
<li> test_win <li> test_win
<li> test_linux <li> test_linux
<li>... and 45 more. <li>... and 45 more.
</ul> </ul>
" "
``` ```
The following is a list of the allowed html tags and attributes: The following is a list of the allowed html tags and attributes:

View File

@ -53,8 +53,8 @@ Turn auxiliary heater on/off for climate device
```yaml ```yaml
automation: automation:
triggers: triggers:
trigger: time - trigger: time
at: "07:15:00" at: "07:15:00"
actions: actions:
- action: climate.set_aux_heat - action: climate.set_aux_heat
target: target:
@ -79,8 +79,8 @@ reflecting a situation where the climate device is set to save energy. For examp
```yaml ```yaml
automation: automation:
triggers: triggers:
trigger: time - trigger: time
at: "07:15:00" at: "07:15:00"
actions: actions:
- action: climate.set_preset_mode - action: climate.set_preset_mode
target: target:
@ -107,8 +107,8 @@ Set target temperature of climate device
### Set temperature to 24 in heat mode ### Set temperature to 24 in heat mode
automation: automation:
triggers: triggers:
trigger: time - trigger: time
at: "07:15:00" at: "07:15:00"
actions: actions:
- action: climate.set_temperature - action: climate.set_temperature
target: target:
@ -122,8 +122,8 @@ automation:
### Set temperature range to 20 to 24 in heat_cool mode ### Set temperature range to 20 to 24 in heat_cool mode
automation: automation:
triggers: triggers:
trigger: time - trigger: time
at: "07:15:00" at: "07:15:00"
actions: actions:
- action: climate.set_temperature - action: climate.set_temperature
target: target:
@ -148,8 +148,8 @@ Set target humidity of climate device
```yaml ```yaml
automation: automation:
triggers: triggers:
trigger: time - trigger: time
at: "07:15:00" at: "07:15:00"
actions: actions:
- action: climate.set_humidity - action: climate.set_humidity
target: target:
@ -172,8 +172,8 @@ Set fan operation for climate device
```yaml ```yaml
automation: automation:
triggers: triggers:
trigger: time - trigger: time
at: "07:15:00" at: "07:15:00"
actions: actions:
- action: climate.set_fan_mode - action: climate.set_fan_mode
target: target:
@ -196,8 +196,8 @@ Set climate device's HVAC mode
```yaml ```yaml
automation: automation:
triggers: triggers:
trigger: time - trigger: time
at: "07:15:00" at: "07:15:00"
actions: actions:
- action: climate.set_hvac_mode - action: climate.set_hvac_mode
target: target:
@ -220,8 +220,8 @@ Set swing operation mode for climate device
```yaml ```yaml
automation: automation:
triggers: triggers:
trigger: time - trigger: time
at: "07:15:00" at: "07:15:00"
actions: actions:
- action: climate.set_swing_mode - action: climate.set_swing_mode
target: target:

View File

@ -147,17 +147,16 @@ system_log:
```yaml ```yaml
# Example configuration.yaml entry # Example configuration.yaml entry
automation: automation:
- id: 'errorcounterautomation' - alias: "Error Counting Automation"
alias: "Error Counting Automation"
triggers: triggers:
trigger: event - trigger: event
event_type: system_log_event event_type: system_log_event
event_data: event_data:
level: ERROR level: ERROR
actions: actions:
action: counter.increment - action: counter.increment
target: target:
entity_id: counter.error_counter entity_id: counter.error_counter
counter: counter:
error_counter: error_counter:

View File

@ -76,8 +76,8 @@ Available actions: `cover.open_cover`, `cover.close_cover`, `cover.stop_cover`,
```yaml ```yaml
automation: automation:
triggers: triggers:
trigger: time - trigger: time
at: "07:15:00" at: "07:15:00"
actions: actions:
- action: cover.open_cover - action: cover.open_cover
target: target:
@ -98,8 +98,8 @@ Set cover position of one or multiple covers.
```yaml ```yaml
automation: automation:
triggers: triggers:
trigger: time - trigger: time
at: "07:15:00" at: "07:15:00"
actions: actions:
- action: cover.set_cover_position - action: cover.set_cover_position
target: target:
@ -122,8 +122,8 @@ Set cover tilt position of one or multiple covers.
```yaml ```yaml
automation: automation:
triggers: triggers:
trigger: time - trigger: time
at: "07:15:00" at: "07:15:00"
actions: actions:
- action: cover.set_cover_tilt_position - action: cover.set_cover_tilt_position
target: target:

View File

@ -287,7 +287,6 @@ Note: Requires `on: true` to change color while the Philips Hue bulb is off. If
```yaml ```yaml
automation: automation:
- alias: "Flash Hue Bulb with Doorbell Motion" - alias: "Flash Hue Bulb with Doorbell Motion"
mode: single
triggers: triggers:
- trigger: state - trigger: state
entity_id: binary_sensor.doorbell_motion entity_id: binary_sensor.doorbell_motion

View File

@ -20,8 +20,7 @@ Device automations are meant to be configured via the UI.
Example: Example:
```yaml ```yaml
- id: "123456789" - alias: "Light turns off"
alias: "Light turns off"
triggers: triggers:
- trigger: device - trigger: device
device_id: 7a92d5ee74014a0b86903fc669b0bcd6 device_id: 7a92d5ee74014a0b86903fc669b0bcd6

View File

@ -44,18 +44,18 @@ If you have a sensor session running, and once you have enabled the Dexcom integ
## Example automation ## Example automation
```yaml ```yaml
- id: '1234567890123' - alias: "Overnight low kitchen lights"
alias: "overnight_low_kitchen_lights" description: "Turn on the lights in the kitchen if my blood sugar drops low overnight"
description: Turn on the lights in the kitchen if my blood sugar drops low overnight
triggers: triggers:
- below: '65' - trigger: numeric_state
entity_id: sensor.dexcom_YOUR_USERNAME_glucose_value entity_id: sensor.dexcom_YOUR_USERNAME_glucose_value
trigger: numeric_state below: 65
condition: time conditions:
after: "22:00:00" - condition: time
before: "06:00:00" after: "22:00:00"
before: "06:00:00"
actions: actions:
- action: light.turn_on - action: light.turn_on
target: target:
entity_id: light.kitchen entity_id: light.kitchen
``` ```

View File

@ -105,10 +105,10 @@ The example automation below shows how to turn on a light when somebody presses
```yaml ```yaml
- alias: "Doorbird Ring" - alias: "Doorbird Ring"
triggers: triggers:
trigger: event - trigger: event
event_type: doorbird_driveway_gate_somebody_pressed_the_button event_type: doorbird_driveway_gate_somebody_pressed_the_button
actions: actions:
action: light.turn_on - action: light.turn_on
target: target:
entity_id: light.side_entry_porch entity_id: light.side_entry_porch
``` ```

View File

@ -77,13 +77,13 @@ This is a notify platform and thus can be controlled by calling the notify actio
automation: automation:
- alias: "The sun has set" - alias: "The sun has set"
triggers: triggers:
trigger: sun - trigger: sun
event: sunset event: sunset
actions: actions:
action: notify.dovado - action: notify.dovado
data: data:
message: "The sun has set" message: "The sun has set"
target: "+14151234567" target: "+14151234567"
``` ```
## Sensor ## Sensor

View File

@ -52,11 +52,11 @@ Along with the event the following payload parameters are available:
```yaml ```yaml
- alias: "Download Failed Notification" - alias: "Download Failed Notification"
triggers: triggers:
trigger: event - trigger: event
event_type: downloader_download_failed event_type: downloader_download_failed
actions: actions:
action: persistent_notification.create - action: persistent_notification.create
data: data:
message: "{{trigger.event.data.filename}} download failed" message: "{{trigger.event.data.filename}} download failed"
title: "Download Failed" title: "Download Failed"
``` ```

View File

@ -81,7 +81,7 @@ Example automation, in YAML format, that triggers a visual notification when
a binary sensor (a doorbell) is triggered: a binary sensor (a doorbell) is triggered:
```yaml ```yaml
- alias: Visual doorbell notification example - alias: "Visual doorbell notification example"
triggers: triggers:
- trigger: state - trigger: state
entity_id: binary_sensor.doorbell entity_id: binary_sensor.doorbell

View File

@ -112,15 +112,15 @@ Sample automation to switch lights on and off:
automation: automation:
- alias: "Hall light switches" - alias: "Hall light switches"
triggers: triggers:
trigger: event - trigger: event
event_type: button_pressed event_type: button_pressed
event_data: event_data:
id: [0xYY, 0xYY, 0xYY, 0xYY] id: [0xYY, 0xYY, 0xYY, 0xYY]
pushed: 0 pushed: 0
actions: actions:
action: "{% if trigger.event.data.onoff %} light.turn_on {% else %} light.turn_off {%endif %}" - action: "{% if trigger.event.data.onoff %} light.turn_on {% else %} light.turn_off {%endif %}"
target: target:
entity_id: "{% if trigger.event.data.which == 1 %} light.hall_left {% else %} light.hall_right {%endif %}" entity_id: "{% if trigger.event.data.which == 1 %} light.hall_left {% else %} light.hall_right {%endif %}"
``` ```
{% endraw %} {% endraw %}

View File

@ -49,15 +49,15 @@ The phone number used in **target** should be registered with Facebook messenger
automation: automation:
- alias: "Evening Greeting" - alias: "Evening Greeting"
triggers: triggers:
trigger: sun - trigger: sun
event: sunset event: sunset
actions: actions:
action: notify.facebook - action: notify.facebook
data: data:
message: "Good Evening" message: "Good Evening"
target: target:
- '+919413017584' - '+919413017584'
- '+919784516314' - '+919784516314'
``` ```
You can also send messages to users that do not have stored their phone number on Facebook, but this requires a bit more work. The Messenger platform uses page-specific user IDs instead of a global user ID. You will need to enable a webhook for the "messages" event in Facebook's developer console. Once a user writes a message to a page, that webhook will then receive the user's page specific ID as part of the webhook's payload. Below is a simple PHP script that reacts to the message "get my id" and sends a reply containing the user's ID: You can also send messages to users that do not have stored their phone number on Facebook, but this requires a bit more work. The Messenger platform uses page-specific user IDs instead of a global user ID. You will need to enable a webhook for the "messages" event in Facebook's developer console. Once a user writes a message to a page, that webhook will then receive the user's page specific ID as part of the webhook's payload. Below is a simple PHP script that reacts to the message "get my id" and sends a reply containing the user's ID:

View File

@ -51,8 +51,8 @@ Sets the speed percentage for fan device.
```yaml ```yaml
automation: automation:
triggers: triggers:
trigger: time - trigger: time
at: "07:15:00" at: "07:15:00"
actions: actions:
- action: fan.set_percentage - action: fan.set_percentage
target: target:
@ -75,8 +75,8 @@ Sets a preset mode for the fan device. Available preset modes are defined by the
```yaml ```yaml
automation: automation:
triggers: triggers:
trigger: time - trigger: time
at: "07:15:00" at: "07:15:00"
actions: actions:
- action: fan.set_preset_mode - action: fan.set_preset_mode
target: target:
@ -99,8 +99,8 @@ Sets the rotation for fan device.
```yaml ```yaml
automation: automation:
triggers: triggers:
trigger: time - trigger: time
at: "07:15:00" at: "07:15:00"
actions: actions:
- action: fan.set_direction - action: fan.set_direction
target: target:
@ -123,8 +123,8 @@ Sets the oscillation for fan device.
```yaml ```yaml
automation: automation:
triggers: triggers:
trigger: time - trigger: time
at: "07:15:00" at: "07:15:00"
actions: actions:
- action: fan.oscillate - action: fan.oscillate
target: target:
@ -157,8 +157,8 @@ Turn fan device off. This is only supported if the fan device supports being tur
```yaml ```yaml
automation: automation:
triggers: triggers:
trigger: time - trigger: time
at: "07:15:00" at: "07:15:00"
actions: actions:
- action: fan.turn_off - action: fan.turn_off
target: target:

View File

@ -30,12 +30,12 @@ Feedreader events can be used out of the box to trigger automation actions, e.g.
automation: automation:
- alias: "Trigger action when new element(s) in RSS feed" - alias: "Trigger action when new element(s) in RSS feed"
triggers: triggers:
trigger: event - trigger: event
event_type: feedreader event_type: feedreader
actions: actions:
action: script.turn_on - action: script.turn_on
target: target:
entity_id: script.my_action entity_id: script.my_action
``` ```
{% raw %} {% raw %}
@ -44,16 +44,16 @@ automation:
automation: automation:
- alias: "Send notification of RSS feed title when updated" - alias: "Send notification of RSS feed title when updated"
triggers: triggers:
trigger: event - trigger: event
event_type: feedreader event_type: feedreader
event_data: event_data:
feed_url: "https://hasspodcast.io/feed/podcast" feed_url: "https://hasspodcast.io/feed/podcast"
actions: actions:
action: persistent_notification.create - action: persistent_notification.create
data: data:
title: "New HA Podcast available" title: "New HA Podcast available"
message: "New Podcast available - {{ as_timestamp(now()) | timestamp_custom('%I:%M:%S %p %d%b%Y', true) }}" message: "New Podcast available - {{ as_timestamp(now()) | timestamp_custom('%I:%M:%S %p %d%b%Y', true) }}"
notification_id: "{{ trigger.event.data.title }}" notification_id: "{{ trigger.event.data.title }}"
``` ```
{% endraw %} {% endraw %}

View File

@ -118,18 +118,18 @@ These are documented below.
automation: automation:
- alias: "Switch on a light when incident is received" - alias: "Switch on a light when incident is received"
triggers: triggers:
trigger: state - trigger: state
entity_id: sensor.incidents entity_id: sensor.incidents
actions: actions:
action: light.turn_on - action: light.turn_on
target: target:
entity_id: light.bedroom entity_id: light.bedroom
- alias: "Play TTS incident details when incident is received" - alias: "Play TTS incident details when incident is received"
triggers: triggers:
trigger: state - trigger: state
entity_id: sensor.incidents entity_id: sensor.incidents
attribute: message_to_speech_url attribute: message_to_speech_url
conditions: conditions:
- condition: not - condition: not
conditions: conditions:
@ -139,7 +139,7 @@ automation:
state: None state: None
actions: actions:
- action: media_player.play_media - action: media_player.play_media
data_template: data:
entity_id: media_player.nest_hub_bedroom entity_id: media_player.nest_hub_bedroom
media_content_id: > media_content_id: >
{{ state_attr('sensor.incidents','message_to_speech_url') }} {{ state_attr('sensor.incidents','message_to_speech_url') }}
@ -147,22 +147,22 @@ automation:
- alias: "Send response acknowledgement when a button is pressed" - alias: "Send response acknowledgement when a button is pressed"
triggers: triggers:
trigger: state - trigger: state
entity_id: switch.response_button entity_id: switch.response_button
actions: actions:
action: homeassistant.turn_on - action: homeassistant.turn_on
target: target:
entity_id: switch.incident_response entity_id: switch.incident_response
- alias: "Cast FireServiceRota dashboard to Nest Hub" - alias: "Cast FireServiceRota dashboard to Nest Hub"
trigger: triggers:
trigger: homeassistant - trigger: homeassistant
event: start event: start
actions: actions:
action: cast.show_lovelace_view - action: cast.show_lovelace_view
data: data:
entity_id: media_player.nest_hub_bedroom entity_id: media_player.nest_hub_bedroom
view_path: fsr view_path: fsr
``` ```

View File

@ -79,15 +79,15 @@ The flic integration fires `flic_click` events on the bus. You can capture the e
automation: automation:
- alias: "Turn on lights in the living room when flic is pressed once" - alias: "Turn on lights in the living room when flic is pressed once"
triggers: triggers:
trigger: event - trigger: event
event_type: flic_click event_type: flic_click
event_data: event_data:
button_name: flic_81e4ac74b6d2 button_name: flic_81e4ac74b6d2
click_type: single click_type: single
actions: actions:
action: homeassistant.turn_on - action: homeassistant.turn_on
target: target:
entity_id: group.lights_livingroom entity_id: group.lights_livingroom
``` ```
Event data: Event data:
@ -105,8 +105,8 @@ To help detect and debug flic button clicks, you can use this automation that se
automation: automation:
- alias: "FLIC Html5 notify on every click" - alias: "FLIC Html5 notify on every click"
triggers: triggers:
trigger: event - trigger: event
event_type: flic_click event_type: flic_click
actions: actions:
- action: notify.html5 - action: notify.html5
data: data:

View File

@ -54,15 +54,15 @@ Automations can be triggered on file system events data using a template. The fo
automation: automation:
 alias: "New file alert"  alias: "New file alert"
triggers: triggers:
  trigger: state - trigger: state
entity_id: event.created entity_id: event.created
actions: actions:
  action: notify.notify - action: notify.notify
  data: data:
    title: New image captured! title: New image captured!
    message: "Created {{ trigger.to_state.attributes.file }} in {{ trigger.to_state.attributes.folder }}" message: "Created {{ trigger.to_state.attributes.file }} in {{ trigger.to_state.attributes.folder }}"
    data: data:
      file: "{{ trigger.to_state.attributes.file }}" file: "{{ trigger.to_state.attributes.file }}"
``` ```
{% endraw %} {% endraw %}

View File

@ -59,12 +59,12 @@ Foursquare check-in events can be used out of the box to trigger automation acti
automation: automation:
- alias: "Trigger action when you check into a venue." - alias: "Trigger action when you check into a venue."
triggers: triggers:
trigger: event - trigger: event
event_type: foursquare.push event_type: foursquare.push
actions: actions:
action: script.turn_on - action: script.turn_on
target: target:
entity_id: script.my_action entity_id: script.my_action
``` ```
### Check ins ### Check ins

View File

@ -50,14 +50,14 @@ In case your device (friendly name) is called *badezimmer*, an example automatio
# Example configuration.yaml automation # Example configuration.yaml automation
alias: "Bathroom Motion Detected" alias: "Bathroom Motion Detected"
triggers: triggers:
trigger: state - trigger: state
entity_id: binary_sensor.motion_sensor_166d0001171111 entity_id: binary_sensor.motion_sensor_166d0001171111
from: "off" from: "off"
to: "on" to: "on"
actions: actions:
action: media_player.turn_on - action: media_player.turn_on
target: target:
entity_id: "media_player.badezimmer" entity_id: "media_player.badezimmer"
``` ```
## Screenshots: ## Screenshots:

View File

@ -92,16 +92,16 @@ Each such entity has a state attribute that will contain a list of any such issu
```yaml ```yaml
- alias: "GeniusHub Error Alerts" - alias: "GeniusHub Error Alerts"
triggers: triggers:
trigger: numeric_state - trigger: numeric_state
entity_id: sensor.geniushub_errors entity_id: sensor.geniushub_errors
above: 0 above: 0
actions: actions:
- action: notify.pushbullet_notifier - action: notify.pushbullet_notifier
data: data:
title: "Genius Hub has errors" title: "Genius Hub has errors"
message: >- message: >-
Genius Hub has the following {{ states('sensor.geniushub_errors') }} errors: Genius Hub has the following {{ states('sensor.geniushub_errors') }} errors:
{{ state_attr('sensor.geniushub_errors', 'error_list') }} {{ state_attr('sensor.geniushub_errors', 'error_list') }}
``` ```
{% endraw %} {% endraw %}
@ -113,15 +113,15 @@ This alert may be useful to see if the CH is being turned on whilst you're on a
```yaml ```yaml
- alias: "GeniusHub CH State Change Alert" - alias: "GeniusHub CH State Change Alert"
triggers: triggers:
trigger: state - trigger: state
entity_id: binary_sensor.dual_channel_receiver_2_1 entity_id: binary_sensor.dual_channel_receiver_2_1
actions: actions:
- action: notify.pushbullet_notifier - action: notify.pushbullet_notifier
data: data:
title: "Warning: CH State Change!" title: "Warning: CH State Change!"
message: >- message: >-
{{ trigger.to_state.attributes.friendly_name }} has changed {{ trigger.to_state.attributes.friendly_name }} has changed
from {{ trigger.from_state.state }} to {{ trigger.to_state.state }}. from {{ trigger.from_state.state }} to {{ trigger.to_state.state }}.
``` ```
{% endraw %} {% endraw %}

View File

@ -57,13 +57,13 @@ zone:
automation: automation:
- alias: "Bush Fire Alert" - alias: "Bush Fire Alert"
triggers: triggers:
trigger: geo_location - trigger: geo_location
source: nsw_rural_fire_service_feed source: nsw_rural_fire_service_feed
zone: zone.bush_fire_alert_zone zone: zone.bush_fire_alert_zone
event: enter event: enter
conditions: conditions:
condition: template - condition: template
value_template: "{{ trigger.to_state.attributes.type == 'Bush Fire' }}" value_template: "{{ trigger.to_state.attributes.type == 'Bush Fire' }}"
actions: actions:
- action: persistent_notification.create - action: persistent_notification.create
data: data:

View File

@ -67,8 +67,7 @@ Using automatic polling can lead to calls that exceed your API limit, especially
You can use the `homeassistant.update_entity` action to update the sensor on-demand. For example, if you want to update `sensor.morning_commute` every 2 minutes on weekday mornings, you can use the following automation: You can use the `homeassistant.update_entity` action to update the sensor on-demand. For example, if you want to update `sensor.morning_commute` every 2 minutes on weekday mornings, you can use the following automation:
```yaml ```yaml
- id: update_morning_commute_sensor - alias: "Commute - Update morning commute sensor"
alias: "Commute - Update morning commute sensor"
initial_state: "on" initial_state: "on"
triggers: triggers:
- trigger: time_pattern - trigger: time_pattern

View File

@ -206,26 +206,26 @@ The example below shows how to control an `input_boolean` switch using the Harmo
automation: automation:
- alias: "Watch TV started from harmony hub" - alias: "Watch TV started from harmony hub"
triggers: triggers:
trigger: state - trigger: state
entity_id: remote.family_room entity_id: remote.family_room
conditions: conditions:
condition: template - condition: template
value_template: '{{ trigger.to_state.attributes.current_activity == "Kodi" }}' value_template: '{{ trigger.to_state.attributes.current_activity == "Kodi" }}'
actions: actions:
action: input_boolean.turn_on - action: input_boolean.turn_on
target: target:
entity_id: input_boolean.notify entity_id: input_boolean.notify
- alias: "PowerOff started from harmony hub" - alias: "PowerOff started from harmony hub"
triggers: triggers:
trigger: state - trigger: state
entity_id: remote.family_room entity_id: remote.family_room
conditions: conditions:
condition: template - condition: template
value_template: '{{ trigger.to_state.attributes.current_activity == "PowerOff" }}' value_template: '{{ trigger.to_state.attributes.current_activity == "PowerOff" }}'
actions: actions:
action: input_boolean.turn_off - action: input_boolean.turn_off
target: target:
entity_id: input_boolean.notify entity_id: input_boolean.notify
``` ```
{% endraw %} {% endraw %}

View File

@ -171,7 +171,7 @@ So an Automation action using the example above would look something like this.
```yaml ```yaml
actions: actions:
action: hdmi_cec.select_device - action: hdmi_cec.select_device
data: data:
device: Chromecast device: Chromecast
``` ```
@ -184,7 +184,7 @@ An Automation action using the example above would look something like this.
```yaml ```yaml
actions: actions:
action: hdmi_cec.power_on - action: hdmi_cec.power_on
``` ```
### Standby ### Standby
@ -195,7 +195,7 @@ An Automation action using the example above would look something like this.
```yaml ```yaml
actions: actions:
action: hdmi_cec.standby - action: hdmi_cec.standby
``` ```
### Change volume level ### Change volume level

View File

@ -68,8 +68,7 @@ You can also use the `homeassistant.update_entity` action to update the sensor o
```yaml ```yaml
automation: automation:
- id: update_morning_commute_sensor - alias: "Commute - Update morning commute sensor"
alias: "Commute - Update morning commute sensor"
initial_state: "on" initial_state: "on"
triggers: triggers:
- trigger: time_pattern - trigger: time_pattern

View File

@ -314,11 +314,11 @@ Update the location of the Home Assistant default zone (usually "Home").
```yaml ```yaml
actions: actions:
action: homeassistant.set_location - action: homeassistant.set_location
data: data:
latitude: 32.87336 latitude: 32.87336
longitude: 117.22743 longitude: 117.22743
elevation: 120 elevation: 120
``` ```
### Action `homeassistant.toggle` ### Action `homeassistant.toggle`
@ -336,11 +336,11 @@ for example, a light and a switch can be toggled in a single action.
```yaml ```yaml
actions: actions:
action: homeassistant.toggle - action: homeassistant.toggle
target: target:
entity_id: entity_id:
- light.living_room - light.living_room
- switch.tv - switch.tv
``` ```
### Action `homeassistant.turn_on` ### Action `homeassistant.turn_on`
@ -358,11 +358,11 @@ for example, a light and a switch can be turned on in a single action.
```yaml ```yaml
actions: actions:
action: homeassistant.turn_on - action: homeassistant.turn_on
target: target:
entity_id: entity_id:
- light.living_room - light.living_room
- switch.tv - switch.tv
``` ```
### Action `homeassistant.turn_off` ### Action `homeassistant.turn_off`
@ -380,11 +380,11 @@ for example, a light and a switch can be turned off in a single action.
```yaml ```yaml
actions: actions:
action: homeassistant.turn_off - action: homeassistant.turn_off
target: target:
entity_id: entity_id:
- light.living_room - light.living_room
- switch.tv - switch.tv
``` ```
### Action `homeassistant.update_entity` ### Action `homeassistant.update_entity`
@ -399,11 +399,11 @@ Force one or more entities to update its data rather than wait for the next sche
```yaml ```yaml
actions: actions:
action: homeassistant.update_entity - action: homeassistant.update_entity
target: target:
entity_id: entity_id:
- light.living_room - light.living_room
- switch.coffe_pot - switch.coffe_pot
``` ```
### Action `homeassistant.save_persistent_states` ### Action `homeassistant.save_persistent_states`

View File

@ -455,16 +455,16 @@ The key name will be available in the event data in the `key_name` field. Exampl
```yaml ```yaml
automation: automation:
triggers: triggers:
trigger: event - trigger: event
event_type: homekit_tv_remote_key_pressed event_type: homekit_tv_remote_key_pressed
event_data: event_data:
key_name: arrow_right key_name: arrow_right
# Send the arrow right key via a broadlink IR blaster # Send the arrow right key via a broadlink IR blaster
actions: actions:
action: broadlink.send - action: broadlink.send
host: 192.168.1.55 host: 192.168.1.55
packet: XXXXXXXX packet: XXXXXXXX
``` ```
## Events ## Events

View File

@ -252,17 +252,17 @@ Here's an example of how to use these events for automations:
```yaml ```yaml
automation: automation:
triggers: triggers:
trigger: event - trigger: event
event_type: homematic.keypress event_type: homematic.keypress
event_data: event_data:
name: "Kitchen Switch" name: "Kitchen Switch"
channel: 1 channel: 1
param: PRESS_SHORT param: PRESS_SHORT
actions: actions:
action: switch.turn_on - action: switch.turn_on
target: target:
entity_id: switch.Kitchen_Ambience entity_id: switch.Kitchen_Ambience
``` ```
The channel parameter is equal to the channel of the button you are configuring the automation for. You can view the available channels in the UI you use to pair your devices. The channel parameter is equal to the channel of the button you are configuring the automation for. You can view the available channels in the UI you use to pair your devices.
@ -307,11 +307,11 @@ Simulate a button being pressed:
```yaml ```yaml
... ...
actions: actions:
action: homematic.virtualkey - action: homematic.virtualkey
data: data:
address: "BidCoS-RF" address: "BidCoS-RF"
channel: 1 channel: 1
param: PRESS_LONG param: PRESS_LONG
``` ```
Open KeyMatic: Open KeyMatic:
@ -319,11 +319,11 @@ Open KeyMatic:
```yaml ```yaml
... ...
actions: actions:
action: homematic.virtualkey - action: homematic.virtualkey
data: data:
address: "LEQ1234567" address: "LEQ1234567"
channel: 1 channel: 1
param: OPEN param: OPEN
``` ```
Set boolean variable to true: Set boolean variable to true:
@ -331,12 +331,12 @@ Set boolean variable to true:
```yaml ```yaml
... ...
actions: actions:
action: homematic.set_variable_value - action: homematic.set_variable_value
target: target:
entity_id: homematic.ccu2 entity_id: homematic.ccu2
data: data:
name: "Variablename" name: "Variablename"
value: true value: true
``` ```
#### Advanced examples #### Advanced examples
@ -349,12 +349,12 @@ Manually turn on a switch actor:
```yaml ```yaml
... ...
actions: actions:
action: homematic.set_device_value - action: homematic.set_device_value
data: data:
address: "LEQ1234567" address: "LEQ1234567"
channel: 1 channel: 1
param: STATE param: STATE
value: true value: true
``` ```
Manually set temperature on thermostat: Manually set temperature on thermostat:
@ -362,12 +362,12 @@ Manually set temperature on thermostat:
```yaml ```yaml
... ...
actions: actions:
action: homematic.set_device_value - action: homematic.set_device_value
data: data:
address: "LEQ1234567" address: "LEQ1234567"
channel: 4 channel: 4
param: SET_TEMPERATURE param: SET_TEMPERATURE
value: 23.0 value: 23.0
``` ```
Manually set the active profile on thermostat: Manually set the active profile on thermostat:
@ -375,13 +375,13 @@ Manually set the active profile on thermostat:
```yaml ```yaml
... ...
actions: actions:
action: homematic.set_device_value - action: homematic.set_device_value
data: data:
address: "LEQ1234567" address: "LEQ1234567"
channel: 1 channel: 1
param: ACTIVE_PROFILE param: ACTIVE_PROFILE
value: 1 value: 1
value_type: int value_type: int
``` ```
Set the week program of a wall thermostat: Set the week program of a wall thermostat:
@ -389,13 +389,13 @@ Set the week program of a wall thermostat:
```yaml ```yaml
... ...
actions: actions:
action: homematic.put_paramset - action: homematic.put_paramset
data: data:
interface: wireless interface: wireless
address: "LEQ1234567" address: "LEQ1234567"
paramset_key: MASTER paramset_key: MASTER
paramset: paramset:
WEEK_PROGRAM_POINTER: 1 WEEK_PROGRAM_POINTER: 1
``` ```
Set the week program of a wall thermostat with explicit `rx_mode` (BidCos-RF only): Set the week program of a wall thermostat with explicit `rx_mode` (BidCos-RF only):
@ -403,14 +403,14 @@ Set the week program of a wall thermostat with explicit `rx_mode` (BidCos-RF onl
```yaml ```yaml
... ...
actions: actions:
action: homematic.put_paramset - action: homematic.put_paramset
data: data:
interface: wireless interface: wireless
address: "LEQ1234567" address: "LEQ1234567"
paramset_key: MASTER paramset_key: MASTER
rx_mode: WAKEUP rx_mode: WAKEUP
paramset: paramset:
WEEK_PROGRAM_POINTER: 1 WEEK_PROGRAM_POINTER: 1
``` ```
BidCos-RF devices have an optional parameter for put_paramset which defines the way the configuration data is sent to the device. BidCos-RF devices have an optional parameter for put_paramset which defines the way the configuration data is sent to the device.
@ -424,9 +424,9 @@ Manually set lock on KeyMatic devices:
```yaml ```yaml
... ...
actions: actions:
action: lock.lock - action: lock.lock
target: target:
entity_id: lock.leq1234567 entity_id: lock.leq1234567
``` ```
Manually set unlock on KeyMatic devices: Manually set unlock on KeyMatic devices:
@ -434,9 +434,9 @@ Manually set unlock on KeyMatic devices:
```yaml ```yaml
... ...
actions: actions:
action: lock.unlock - action: lock.unlock
target: target:
entity_id: lock.leq1234567 entity_id: lock.leq1234567
``` ```
@ -489,12 +489,12 @@ template:
automation: automation:
- alias: "Homematic Reconnect" - alias: "Homematic Reconnect"
triggers: triggers:
trigger: state - trigger: state
entity_id: binary_sensor.homematic_is_sending_updates entity_id: binary_sensor.homematic_is_sending_updates
to: "off" to: "off"
actions: actions:
# Reconnect, if sensor has not been updated for over 10 minutes # Reconnect, if sensor has not been updated for over 10 minutes
action: homematic.reconnect - action: homematic.reconnect
``` ```
{% endraw %} {% endraw %}
@ -535,10 +535,10 @@ automation:
automation: automation:
- alias: "Homematic CCU Reboot" - alias: "Homematic CCU Reboot"
triggers: triggers:
trigger: state - trigger: state
entity_id: sensor.v_last_reboot entity_id: sensor.v_last_reboot
actions: actions:
action: homematic.reconnect - action: homematic.reconnect
``` ```
## Notifications ## Notifications

View File

@ -235,10 +235,10 @@ Activate eco mode with duration.
```yaml ```yaml
... ...
actions: actions:
action: homematicip_cloud.activate_eco_mode_with_duration - action: homematicip_cloud.activate_eco_mode_with_duration
data: data:
duration: 60 duration: 60
accesspoint_id: 3014xxxxxxxxxxxxxxxxxxxx accesspoint_id: 3014xxxxxxxxxxxxxxxxxxxx
``` ```
Activate eco mode with period. Activate eco mode with period.
@ -246,10 +246,10 @@ Activate eco mode with period.
```yaml ```yaml
... ...
actions: actions:
action: homematicip_cloud.activate_eco_mode_with_period - action: homematicip_cloud.activate_eco_mode_with_period
data: data:
endtime: 2019-09-17 18:00 endtime: 2019-09-17 18:00
accesspoint_id: 3014xxxxxxxxxxxxxxxxxxxx accesspoint_id: 3014xxxxxxxxxxxxxxxxxxxx
``` ```
Activates the vacation mode until the given time. Activates the vacation mode until the given time.
@ -257,11 +257,11 @@ Activates the vacation mode until the given time.
```yaml ```yaml
... ...
actions: actions:
action: homematicip_cloud.activate_vacation - action: homematicip_cloud.activate_vacation
data: data:
endtime: 2019-09-17 18:00 endtime: 2019-09-17 18:00
temperature: 18.5 temperature: 18.5
accesspoint_id: 3014xxxxxxxxxxxxxxxxxxxx accesspoint_id: 3014xxxxxxxxxxxxxxxxxxxx
``` ```
Deactivates the eco mode immediately. Deactivates the eco mode immediately.
@ -269,9 +269,9 @@ Deactivates the eco mode immediately.
```yaml ```yaml
... ...
actions: actions:
action: homematicip_cloud.deactivate_eco_mode - action: homematicip_cloud.deactivate_eco_mode
data: data:
accesspoint_id: 3014xxxxxxxxxxxxxxxxxxxx accesspoint_id: 3014xxxxxxxxxxxxxxxxxxxx
``` ```
Deactivates the vacation mode immediately. Deactivates the vacation mode immediately.
@ -279,9 +279,9 @@ Deactivates the vacation mode immediately.
```yaml ```yaml
... ...
actions: actions:
action: homematicip_cloud.deactivate_vacation - action: homematicip_cloud.deactivate_vacation
data: data:
accesspoint_id: 3014xxxxxxxxxxxxxxxxxxxx accesspoint_id: 3014xxxxxxxxxxxxxxxxxxxx
``` ```
Set the active climate profile index. Set the active climate profile index.
@ -292,11 +292,11 @@ You can get the required index from the native Homematic IP App.
```yaml ```yaml
... ...
actions: actions:
action: homematicip_cloud.set_active_climate_profile - action: homematicip_cloud.set_active_climate_profile
target: target:
entity_id: climate.livingroom entity_id: climate.livingroom
data: data:
climate_profile_index: 1 climate_profile_index: 1
``` ```
Dump the configuration of the Homematic IP Access Point(s). Dump the configuration of the Homematic IP Access Point(s).
@ -304,9 +304,9 @@ Dump the configuration of the Homematic IP Access Point(s).
```yaml ```yaml
... ...
actions: actions:
action: homematicip_cloud.dump_hap_config - action: homematicip_cloud.dump_hap_config
data: data:
anonymize: True anonymize: True
``` ```
Reset energy counter of measuring actuators. Reset energy counter of measuring actuators.
@ -314,9 +314,9 @@ Reset energy counter of measuring actuators.
```yaml ```yaml
... ...
actions: actions:
action: homematicip_cloud.reset_energy_counter - action: homematicip_cloud.reset_energy_counter
target: target:
entity_id: switch.livingroom entity_id: switch.livingroom
``` ```
Enable (or disable) Cooling mode for the entire home. Disabling Cooling mode will revert to Heating. Enable (or disable) Cooling mode for the entire home. Disabling Cooling mode will revert to Heating.
@ -324,10 +324,10 @@ Enable (or disable) Cooling mode for the entire home. Disabling Cooling mode wil
```yaml ```yaml
... ...
actions: actions:
action: homematicip_cloud.set_home_cooling_mode - action: homematicip_cloud.set_home_cooling_mode
data: data:
cooling: True cooling: True
accesspoint_id: 3014xxxxxxxxxxxxxxxxxxxx accesspoint_id: 3014xxxxxxxxxxxxxxxxxxxx
``` ```
## Additional info ## Additional info

View File

@ -113,11 +113,11 @@ Example of adding a tag to your notification. This won't create new notification
- trigger: state - trigger: state
entity_id: sensor.sensor entity_id: sensor.sensor
actions: actions:
action: notify.html5 - action: notify.html5
data:
message: "Last known sensor state is {{ states('sensor.sensor') }}."
data: data:
tag: "notification-about-sensor" message: "Last known sensor state is {{ states('sensor.sensor') }}."
data:
tag: "notification-about-sensor"
``` ```
{% endraw %} {% endraw %}
@ -210,8 +210,8 @@ notification is received on the device.
```yaml ```yaml
- alias: "HTML5 push notification received and displayed on device" - alias: "HTML5 push notification received and displayed on device"
triggers: triggers:
trigger: event - trigger: event
event_type: html5_notification.received event_type: html5_notification.received
``` ```
#### clicked event #### clicked event
@ -221,8 +221,8 @@ You will receive an event named `html5_notification.clicked` when the notificati
```yaml ```yaml
- alias: "HTML5 push notification clicked" - alias: "HTML5 push notification clicked"
triggers: triggers:
trigger: event - trigger: event
event_type: html5_notification.clicked event_type: html5_notification.clicked
``` ```
or or
@ -230,10 +230,10 @@ or
```yaml ```yaml
- alias: "HTML5 push notification action button clicked" - alias: "HTML5 push notification action button clicked"
triggers: triggers:
trigger: event - trigger: event
event_type: html5_notification.clicked event_type: html5_notification.clicked
event_data: event_data:
action: open_door action: open_door
``` ```
#### closed event #### closed event
@ -243,8 +243,8 @@ You will receive an event named `html5_notification.closed` when the notificatio
```yaml ```yaml
- alias: "HTML5 push notification clicked" - alias: "HTML5 push notification clicked"
triggers: triggers:
trigger: event - trigger: event
event_type: html5_notification.closed event_type: html5_notification.closed
``` ```
### Making notifications work with NGINX proxy ### Making notifications work with NGINX proxy

View File

@ -225,8 +225,8 @@ Velocity controls the speed of the shade. The default speed from Hunter Douglas
``` yaml ``` yaml
alias: "Blinds closed at night" alias: "Blinds closed at night"
triggers: triggers:
trigger: time - trigger: time
at: "18:00:00" at: "18:00:00"
actions: actions:
- action: scene.turn_on - action: scene.turn_on
target: target:
@ -238,12 +238,11 @@ actions:
This automation is not recommended for battery-powered shades. This automation is not recommended for battery-powered shades.
``` yaml ``` yaml
alias: Force Update alias: "Force Update"
description: 'Update the position of defined shades' description: "Update the position of defined shades"
mode: single
triggers: triggers:
- trigger: time_pattern - trigger: time_pattern
hours: '1' hours: 1
actions: actions:
- action: homeassistant.update_entity - action: homeassistant.update_entity
target: target:

View File

@ -111,8 +111,7 @@ To start Hyperion with an effect, use the following automation:
```yaml ```yaml
automation: automation:
- id: one - alias: "Turn Hyperion effect on when light goes on"
alias: "Turn Hyperion effect on when light goes on"
triggers: triggers:
- trigger: state - trigger: state
entity_id: light.hyperion entity_id: light.hyperion

View File

@ -91,7 +91,6 @@ To get the Estimated distance sensor to work, in most cases, it has to be calibr
```yaml ```yaml
alias: "The black trash can has left the building" alias: "The black trash can has left the building"
mode: single
triggers: triggers:
- trigger: state - trigger: state
entity_id: sensor.black_trash_bin_estimated_distance entity_id: sensor.black_trash_bin_estimated_distance

View File

@ -36,18 +36,16 @@ You then need to consume that incoming information with the following automation
```yaml ```yaml
automation: automation:
- id: this_is_the_automation_id - alias: "The optional automation alias"
alias: "The optional automation alias"
triggers: triggers:
- trigger: event - trigger: event
event_type: ifttt_webhook_received event_type: ifttt_webhook_received
event_data: event_data:
action: call_service # the same action 'name' you used in the Body section of the IFTTT recipe action: call_service # the same action 'name' you used in the Body section of the IFTTT recipe
conditions:
actions: actions:
- action: '{{ trigger.event.data.service }}' - action: '{{ trigger.event.data.service }}'
target: target:
entity_id: '{{ trigger.event.data.entity_id }}' entity_id: '{{ trigger.event.data.entity_id }}'
``` ```
@ -144,11 +142,11 @@ Add the *Then That* action. The below example sends a notification to the IFTTT
automation: automation:
alias: "Startup Notification" alias: "Startup Notification"
triggers: triggers:
trigger: homeassistant - trigger: homeassistant
event: start event: start
actions: actions:
action: ifttt.trigger - action: ifttt.trigger
data: {"event":"TestHA_Trigger", "value1":"Hello World!"} data: {"event":"TestHA_Trigger", "value1":"Hello World!"}
``` ```
{% endraw %} {% endraw %}
@ -162,14 +160,14 @@ IFTTT can also be used in scripts and with templates. Here is the above automati
automation: automation:
alias: "Startup Notification" alias: "Startup Notification"
triggers: triggers:
trigger: homeassistant - trigger: homeassistant
event: start event: start
actions: actions:
action: script.ifttt_notify - action: script.ifttt_notify
data: data:
value1: "HA Status:" value1: "HA Status:"
value2: "{{ trigger.event.data.entity_id.split('_')[1] }} is " value2: "{{ trigger.event.data.entity_id.split('_')[1] }} is "
value3: "{{ trigger.event.data.to_state.state }}" value3: "{{ trigger.event.data.to_state.state }}"
``` ```
{% endraw %} {% endraw %}

View File

@ -35,11 +35,11 @@ The `found_plate` event is triggered after OpenALPR has found a new license plat
automation: automation:
- alias: "Open garage door" - alias: "Open garage door"
triggers: triggers:
trigger: event - trigger: event
event_type: image_processing.found_plate event_type: image_processing.found_plate
event_data: event_data:
entity_id: openalpr.camera_garage_1 entity_id: openalpr.camera_garage_1
plate: BE2183423 plate: BE2183423
... ...
``` ```
@ -56,11 +56,11 @@ The `detect_face` event is triggered after a Face entity has found a face.
automation: automation:
- alias: "Known person in front of my door" - alias: "Known person in front of my door"
triggers: triggers:
trigger: event - trigger: event
event_type: image_processing.detect_face event_type: image_processing.detect_face
event_data: event_data:
entity_id: image_processing.door entity_id: image_processing.door
name: "Hans Maier" name: "Hans Maier"
... ...
``` ```

View File

@ -194,8 +194,8 @@ The example below filters the event trigger by `entry_id`, fetches the message a
{% raw %} {% raw %}
```yaml ```yaml
alias: imap fetch and seen example alias: "imap fetch and seen example"
description: Fetch and mark an incoming message as seen description: "Fetch and mark an incoming message as seen"
triggers: triggers:
- trigger: event - trigger: event
event_type: imap_content event_type: imap_content
@ -215,10 +215,8 @@ actions:
entry: 91fadb3617c5a3ea692aeb62d92aa869 entry: 91fadb3617c5a3ea692aeb62d92aa869
uid: "{{ trigger.event.data['uid'] }}" uid: "{{ trigger.event.data['uid'] }}"
- action: persistent_notification.create - action: persistent_notification.create
metadata: {}
data: data:
message: "{{ message_text['subject'] }}" message: "{{ message_text['subject'] }}"
mode: single
``` ```
{% endraw %} {% endraw %}

View File

@ -49,16 +49,16 @@ To send an alert if the CV pressure is too low or too high, consider the followi
```yaml ```yaml
- alias: "Low CV Pressure Alert" - alias: "Low CV Pressure Alert"
triggers: triggers:
trigger: numeric_state - trigger: numeric_state
entity_id: sensor.cv_pressure entity_id: sensor.cv_pressure
below: 1.0 below: 1.0
actions: actions:
- action: notify.pushbullet_notifier - action: notify.pushbullet_notifier
data: data:
title: "Warning: Low CH Pressure" title: "Warning: Low CH Pressure"
message: >- message: >-
{{ trigger.to_state.attributes.friendly_name }} {{ trigger.to_state.attributes.friendly_name }}
is low, {{ trigger.to_state.state }} bar. is low, {{ trigger.to_state.state }} bar.
``` ```
{% endraw %} {% endraw %}

View File

@ -118,12 +118,12 @@ automation:
# Turns on bedroom light at the time specified. # Turns on bedroom light at the time specified.
automation: automation:
triggers: triggers:
trigger: time - trigger: time
at: input_datetime.bedroom_alarm_clock_time at: input_datetime.bedroom_alarm_clock_time
actions: actions:
action: light.turn_on - action: light.turn_on
target: target:
entity_id: light.bedroom entity_id: light.bedroom
``` ```
To dynamically set the `input_datetime` you can call To dynamically set the `input_datetime` you can call

View File

@ -125,11 +125,12 @@ input_number:
min: 0 min: 0
max: 254 max: 254
step: 1 step: 1
automation: automation:
- alias: "Bedroom Light - Adjust Brightness" - alias: "Bedroom Light - Adjust Brightness"
triggers: triggers:
trigger: state - trigger: state
entity_id: input_number.bedroom_brightness entity_id: input_number.bedroom_brightness
actions: actions:
- action: light.turn_on - action: light.turn_on
target: target:
@ -157,6 +158,7 @@ input_select:
- Relax - Relax
- 'OFF' - 'OFF'
initial: "Select" initial: "Select"
input_number: input_number:
bedroom_brightness: bedroom_brightness:
name: Brightness name: Brightness
@ -164,12 +166,13 @@ input_number:
min: 0 min: 0
max: 254 max: 254
step: 1 step: 1
automation: automation:
- alias: "Bedroom Light - Custom" - alias: "Bedroom Light - Custom"
triggers: triggers:
trigger: state - trigger: state
entity_id: input_select.scene_bedroom entity_id: input_select.scene_bedroom
to: CUSTOM to: "CUSTOM"
actions: actions:
- action: light.turn_on - action: light.turn_on
target: target:
@ -200,27 +203,27 @@ input_number:
automation: automation:
- alias: "Set temp slider" - alias: "Set temp slider"
triggers: triggers:
trigger: mqtt - trigger: mqtt
topic: "setTemperature" topic: "setTemperature"
actions: actions:
action: input_number.set_value - action: input_number.set_value
target: target:
entity_id: input_number.target_temp entity_id: input_number.target_temp
data: data:
value: "{{ trigger.payload }}" value: "{{ trigger.payload }}"
# This second automation script runs when the target temperature slider is moved. # This second automation script runs when the target temperature slider is moved.
# It publishes its value to the same MQTT topic it is also subscribed to. # It publishes its value to the same MQTT topic it is also subscribed to.
- alias: "Temp slider moved" - alias: "Temp slider moved"
triggers: triggers:
trigger: state - trigger: state
entity_id: input_number.target_temp entity_id: input_number.target_temp
actions: actions:
action: mqtt.publish - action: mqtt.publish
data: data:
topic: "setTemperature" topic: "setTemperature"
retain: true retain: true
payload: "{{ states('input_number.target_temp') | int }}" payload: "{{ states('input_number.target_temp') | int }}"
``` ```
{% endraw %} {% endraw %}
@ -249,16 +252,16 @@ input_number:
step: 10 step: 10
automation: automation:
- alias: "turn something off after x time after turning it on" - alias: "turn something off after x time after turning it on"
triggers: triggers:
trigger: state - trigger: state
entity_id: switch.something entity_id: switch.something
to: "on" to: "on"
actions: actions:
- delay: "00:{{ states('input_number.minutes') | int }}:{{ states('input_number.seconds') | int }}" - delay: "00:{{ states('input_number.minutes') | int }}:{{ states('input_number.seconds') | int }}"
- action: switch.turn_off - action: switch.turn_off
target: target:
entity_id: switch.something entity_id: switch.something
``` ```
{% endraw %} {% endraw %}

View File

@ -136,14 +136,14 @@ The following example shows the usage of the `input_select.select_option` action
automation: automation:
- alias: "example automation" - alias: "example automation"
triggers: triggers:
trigger: event - trigger: event
event_type: MY_CUSTOM_EVENT event_type: MY_CUSTOM_EVENT
actions: actions:
- action: input_select.select_option - action: input_select.select_option
target: target:
entity_id: input_select.who_cooks entity_id: input_select.who_cooks
data: data:
option: Paulus option: "Paulus"
``` ```
To dynamically set the `input_select` options you can call `input_select.set_options` in an automation: To dynamically set the `input_select` options you can call `input_select.set_options` in an automation:
@ -153,8 +153,8 @@ To dynamically set the `input_select` options you can call `input_select.set_opt
automation: automation:
- alias: "example automation" - alias: "example automation"
triggers: triggers:
trigger: event - trigger: event
event_type: MY_CUSTOM_EVENT event_type: MY_CUSTOM_EVENT
actions: actions:
- action: input_select.set_options - action: input_select.set_options
target: target:
@ -186,28 +186,28 @@ input_select:
# It sets the value selector on the GUI. This selector also had its own automation when the value is changed. # It sets the value selector on the GUI. This selector also had its own automation when the value is changed.
- alias: "Set Thermostat Mode Selector" - alias: "Set Thermostat Mode Selector"
triggers: triggers:
trigger: mqtt - trigger: mqtt
topic: "thermostatMode" topic: "thermostatMode"
# entity_id: input_select.thermostat_mode # entity_id: input_select.thermostat_mode
actions: actions:
action: input_select.select_option - action: input_select.select_option
target: target:
entity_id: input_select.thermostat_mode entity_id: input_select.thermostat_mode
data: data:
option: "{{ trigger.payload }}" option: "{{ trigger.payload }}"
# This automation script runs when the thermostat mode selector is changed. # This automation script runs when the thermostat mode selector is changed.
# It publishes its value to the same MQTT topic it is also subscribed to. # It publishes its value to the same MQTT topic it is also subscribed to.
- alias: "Set Thermostat Mode" - alias: "Set Thermostat Mode"
triggers: triggers:
trigger: state - trigger: state
entity_id: input_select.thermostat_mode entity_id: input_select.thermostat_mode
actions: actions:
action: mqtt.publish - action: mqtt.publish
data: data:
topic: "thermostatMode" topic: "thermostatMode"
retain: true retain: true
payload: "{{ states('input_select.thermostat_mode') }}" payload: "{{ states('input_select.thermostat_mode') }}"
``` ```
{% endraw %} {% endraw %}

View File

@ -130,8 +130,8 @@ input_text:
automation: automation:
- alias: "Bedroom Light - Custom" - alias: "Bedroom Light - Custom"
triggers: triggers:
trigger: state - trigger: state
entity_id: input_select.scene_bedroom entity_id: input_select.scene_bedroom
actions: actions:
- action: input_text.set_value - action: input_text.set_value
target: target:

View File

@ -132,8 +132,7 @@ Triggering an Insteon scene on or off is done via automations. Two actions are p
```yaml ```yaml
automation: automation:
# Trigger an Insteon scene 25 # Trigger an Insteon scene 25
- id: trigger_scene_25_on - alias: "Turn on scene 25"
alias: "Turn on scene 25"
actions: actions:
- action: insteon.scene_on - action: insteon.scene_on
group: 25 group: 25
@ -155,8 +154,7 @@ This allows the mini-remotes to be configured as triggers for automations. Here
```yaml ```yaml
automation: automation:
# 4 or 8 button remote with button c pressed # 4 or 8 button remote with button c pressed
- id: light_on - alias: "Turn a light on"
alias: "Turn a light on"
triggers: triggers:
- trigger: event - trigger: event
event_type: insteon.button_on event_type: insteon.button_on
@ -173,8 +171,7 @@ automation:
entity_id: light.some_light entity_id: light.some_light
# single button remote # single button remote
- id: light_off - alias: "Turn a light off"
alias: "Turn a light off"
triggers: triggers:
- trigger: event - trigger: event
event_type: insteon.button_on event_type: insteon.button_on

View File

@ -93,19 +93,19 @@ A Home Assistant `isy994_control` event is emitted for every "control" event in
automation: automation:
- alias: "turn off living room on double tap lightswitch" - alias: "turn off living room on double tap lightswitch"
triggers: triggers:
trigger: event - trigger: event
event_type: isy994_control event_type: isy994_control
event_data: event_data:
entity_id: light.lr_track_lights_front entity_id: light.lr_track_lights_front
control: "DFON" control: "DFON"
value: 255 value: 255
formatted: "On" formatted: "On"
uom: "100" uom: "100"
prec: "0" prec: "0"
actions: actions:
action: light.turn_off - action: light.turn_off
target: target:
entity_id: light.lr_track_lights_rear entity_id: light.lr_track_lights_rear
``` ```
All `isy994_control` events will have an `entity_id` and `control` parameter in its `event_data`. You'll need to refer to ISY documentation for the list of every possible control type, but the common ones are: All `isy994_control` events will have an `entity_id` and `control` parameter in its `event_data`. You'll need to refer to ISY documentation for the list of every possible control type, but the common ones are:

View File

@ -228,7 +228,7 @@ Additional details about the values provided by the sensors can be found in Kale
A typical automation might look like the example below, which turns up the lights when the _media_location_ sensor leaves the _content_ state. A typical automation might look like the example below, which turns up the lights when the _media_location_ sensor leaves the _content_ state.
```yaml ```yaml
- alias: kaleidescape_theater_lights_up - alias: "Kaleidescape theater lights up"
triggers: triggers:
- trigger: state - trigger: state
entity_id: sensor.kaleidescape_theater_media_location entity_id: sensor.kaleidescape_theater_media_location

View File

@ -94,17 +94,17 @@ And an automation rule to breathe life into it:
automation: automation:
alias: "Keyboard all lights on" alias: "Keyboard all lights on"
triggers: triggers:
trigger: event - trigger: event
event_type: keyboard_remote_command_received event_type: keyboard_remote_command_received
event_data: event_data:
device_descriptor: "/dev/input/event0" device_descriptor: "/dev/input/event0"
key_code: 107 # inspect log to obtain desired keycode key_code: 107 # inspect log to obtain desired keycode
type: key_down # only trigger on key_down events (optional) type: key_down # only trigger on key_down events (optional)
actions: actions:
action: light.turn_on - action: light.turn_on
target: target:
entity_id: light.all entity_id: light.all
``` ```
`device_descriptor` or `device_name` may be specified in the trigger so the automation will be fired only for that keyboard. This is especially useful if you wish to use several Bluetooth remotes to control different devices. Omit them to ensure the same key triggers the automation for all keyboards/remotes. `device_descriptor` or `device_name` may be specified in the trigger so the automation will be fired only for that keyboard. This is especially useful if you wish to use several Bluetooth remotes to control different devices. Omit them to ensure the same key triggers the automation for all keyboards/remotes.
@ -125,8 +125,8 @@ Here's an automation example that plays a sound through a media player whenever
automation: automation:
- alias: "Keyboard Connected" - alias: "Keyboard Connected"
triggers: triggers:
trigger: event - trigger: event
event_type: keyboard_remote_connected event_type: keyboard_remote_connected
actions: actions:
- action: media_player.play_media - action: media_player.play_media
target: target:
@ -137,10 +137,10 @@ automation:
- alias: "Bluetooth Keyboard Disconnected" - alias: "Bluetooth Keyboard Disconnected"
triggers: triggers:
trigger: event - trigger: event
event_type: keyboard_remote_disconnected event_type: keyboard_remote_disconnected
event_data: event_data:
device_name: "00:58:56:4C:C0:91" device_name: "00:58:56:4C:C0:91"
actions: actions:
- action: media_player.play_media - action: media_player.play_media
target: target:

View File

@ -208,32 +208,29 @@ Example automation using these IR codes to toggle a Sonoff plug.
```yaml ```yaml
# Example kira_sensor # Example kira_sensor
- id: "1583339338363" - alias: "Panasonic on"
alias: "Panasonic On" description: "Turn on sonoff s20 relay"
description: Turn on sonoff s20 relay
triggers: triggers:
- entity_id: sensor.kira_wireless - trigger: state
trigger: state entity_id: sensor.kira_wireless
to: PanaOne to: "PanaOne"
conditions: []
actions: actions:
- device_id: 3628b4f34df943b3b721ead954cf3ca7 - device_id: 3628b4f34df943b3b721ead954cf3ca7
domain: switch domain: switch
entity_id: switch.plug2_relay entity_id: switch.plug2_relay
type: turn_on type: turn_on
- id: "1584035716024"
alias: "Panaxonic Off " - alias: "Panaxonic off"
description: Turn off sonoff s20 relay description: "Turn off sonoff s20 relay"
triggers: triggers:
- entity_id: sensor.kira_wireless - trigger: state
trigger: state entity_id: sensor.kira_wireless
to: PanaTwo to: "PanaTwo"
conditions: []
actions: actions:
- device_id: 3628b4f34df943b3b721ead954cf3ca7 - device_id: 3628b4f34df943b3b721ead954cf3ca7
domain: switch domain: switch
entity_id: switch.plug2_relay entity_id: switch.plug2_relay
type: turn_off type: turn_off
``` ```
### Code types ### Code types

View File

@ -241,16 +241,14 @@ Example automation configuration
{% raw %} {% raw %}
```yaml ```yaml
- alias: Single group address trigger - alias: "Single group address trigger"
description: ''
triggers: triggers:
- trigger: knx.telegram - trigger: knx.telegram
destination: 1/2/3 destination: 1/2/3
group_value_read: false group_value_read: false
outgoing: false outgoing: false
conditions: "{{ trigger.value == 0 }}" conditions: "{{ trigger.value == 0 }}"
action: [] actions: []
mode: single
``` ```
{% endraw %} {% endraw %}
@ -352,7 +350,7 @@ response:
```yaml ```yaml
# Example script to send a fixed value and the state of an entity # Example script to send a fixed value and the state of an entity
alias: My Script alias: "My Script"
sequence: sequence:
- action: knx.send - action: knx.send
data: data:
@ -623,33 +621,36 @@ Let's pretend you have a binary sensor with the name `Livingroom.Switch` and you
# Example automation.yaml entry # Example automation.yaml entry
automation: automation:
- triggers: - triggers:
trigger: numeric_state - trigger: numeric_state
entity_id: binary_sensor.livingroom_switch entity_id: binary_sensor.livingroom_switch
attribute: counter attribute: counter
above: 0 above: 0
below: 2 below: 2
condition: condition:
- condition: state - condition: state
entity_id: binary_sensor.cover_abstell entity_id: binary_sensor.cover_abstell
state: "on" state: "on"
actions: actions:
- entity_id: light.hue_color_lamp_1 - action: light.turn_on
action: light.turn_on entity_id: light.hue_color_lamp_1
- triggers: - triggers:
trigger: numeric_state - trigger: numeric_state
entity_id: binary_sensor.livingroom_switch entity_id: binary_sensor.livingroom_switch
attribute: counter attribute: counter
above: 1 above: 1
below: 3 below: 3
conditions: conditions:
- condition: state - condition: state
entity_id: binary_sensor.cover_abstell entity_id: binary_sensor.cover_abstell
state: "on" state: "on"
actions: actions:
- entity_id: light.hue_bloom_1 - action: light.turn_on
action: homeassistant.turn_on target:
- entity_id: light.hue_bloom_2 entity_id:
action: homeassistant.turn_on - light.hue_bloom_1
- light.hue_bloom_2
``` ```
{% configuration %} {% configuration %}

View File

@ -43,8 +43,7 @@ These automations can be configured through the UI (see [device triggers](/docs/
```yaml ```yaml
automation: automation:
- id: kodi_turn_on - alias: "Kodi: turn on"
alias: "Kodi: turn on"
triggers: triggers:
- trigger: device - trigger: device
device_id: !secret kodi_device_id device_id: !secret kodi_device_id
@ -54,8 +53,7 @@ automation:
actions: actions:
- action: script.kodi_turn_on - action: script.kodi_turn_on
- id: kodi_turn_off - alias: "Kodi: turn off"
alias: "Kodi: turn off"
triggers: triggers:
- trigger: device - trigger: device
device_id: !secret kodi_device_id device_id: !secret kodi_device_id

View File

@ -165,20 +165,20 @@ To add a notification sound, icon, cycles, or priority override,
```yaml ```yaml
- alias: "Send notification on arrival at school" - alias: "Send notification on arrival at school"
triggers: triggers:
trigger: state - trigger: state
entity_id: device_tracker.tom_mobile entity_id: device_tracker.tom_mobile
from: "not_home" from: "not_home"
to: "school" to: "school"
actions: actions:
action: notify.my_lametric - action: notify.my_lametric
data:
message: "Tom has arrived at school!"
data: data:
sound: "notification" message: "Tom has arrived at school!"
icon: "51" data:
cycles: 0 sound: "notification"
priority: "critical" icon: "51"
icon_type: "info" cycles: 0
priority: "critical"
icon_type: "info"
``` ```
## List of notification sounds ## List of notification sounds

View File

@ -165,7 +165,7 @@ automation:
triggers: triggers:
- trigger: event - trigger: event
event_type: lcn_transponder event_type: lcn_transponder
condition: "{{ trigger.event.data.code in ['aabbcc', 'ddeeff', '112233'] }}" conditions: "{{ trigger.event.data.code in ['aabbcc', 'ddeeff', '112233'] }}"
actions: actions:
... ...
``` ```

View File

@ -77,8 +77,7 @@ In order to apply attributes to an entity, you will need to add `data:` to the c
```yaml ```yaml
# Example configuration.yaml entry # Example configuration.yaml entry
automation: automation:
- id: one - alias: "Turn on light when motion is detected"
alias: "Turn on light when motion is detected"
triggers: triggers:
- trigger: state - trigger: state
entity_id: binary_sensor.motion_1 entity_id: binary_sensor.motion_1
@ -93,11 +92,10 @@ automation:
``` ```
```yaml ```yaml
# Ledlist morning on, red # Ledlist morning on, red
- id: llmor - alias: "Stair morning on"
alias: "Stair morning on"
triggers: triggers:
- at: '05:00' - trigger: time
trigger: time at: '05:00'
actions: actions:
- action: light.turn_on - action: light.turn_on
target: target:

View File

@ -85,14 +85,14 @@ The LIRC integration fires `ir_command_received` events on the bus. You can capt
automation: automation:
- alias: "Off on Remote" - alias: "Off on Remote"
triggers: triggers:
trigger: event - trigger: event
event_type: ir_command_received event_type: ir_command_received
event_data: event_data:
button_name: KEY_0 button_name: KEY_0
actions: actions:
action: homeassistant.turn_off - action: homeassistant.turn_off
target: target:
entity_id: group.a_lights entity_id: group.a_lights
``` ```
The `button_name` data values (e.g., `KEY_0`) are set by you in the `.lircrc` file. The `button_name` data values (e.g., `KEY_0`) are set by you in the `.lircrc` file.

View File

@ -54,14 +54,14 @@ You can then consume that information with the following automation:
```yaml ```yaml
automation: automation:
triggers: triggers:
trigger: event - trigger: event
event_type: mailgun_message_received event_type: mailgun_message_received
event_data: event_data:
action: call_service action: call_service
actions: actions:
action: light.turn_on - action: light.turn_on
target: target:
entity_id: light.office entity_id: light.office
``` ```
## Notifications ## Notifications
@ -103,15 +103,15 @@ The following automation reacts to an event by sending out an email with two att
# Example automation using Mailgun notifications # Example automation using Mailgun notifications
automation: automation:
triggers: triggers:
trigger: event - trigger: event
event_type: SPECIAL_EVENT event_type: SPECIAL_EVENT
actions: actions:
action: notify.mailgun - action: notify.mailgun
data:
title: "Something special has happened"
message: "This a test message from Home Assistant"
data: data:
images: title: "Something special has happened"
- /home/pi/pic_test1.png message: "This a test message from Home Assistant"
- /home/pi/pic_test2.png data:
images:
- /home/pi/pic_test1.png
- /home/pi/pic_test2.png
``` ```

View File

@ -194,9 +194,9 @@ automation:
entity_id: alarm_control_panel.home_alarm entity_id: alarm_control_panel.home_alarm
state: armed_away state: armed_away
actions: actions:
action: alarm_control_panel.alarm_trigger - action: alarm_control_panel.alarm_trigger
target: target:
entity_id: alarm_control_panel.home_alarm entity_id: alarm_control_panel.home_alarm
``` ```
Sending a notification when the alarm is triggered. Sending a notification when the alarm is triggered.

View File

@ -128,26 +128,27 @@ notify:
default_room: "#hasstest:matrix.org" default_room: "#hasstest:matrix.org"
automation: automation:
- alias: 'React to !testword' - alias: "React to !testword"
triggers: triggers:
trigger: event - trigger: event
event_type: matrix_command event_type: matrix_command
event_data: event_data:
command: testword command: testword
actions: actions:
action: notify.matrix_notify - action: notify.matrix_notify
data: data:
message: "It looks like you wrote !testword" message: "It looks like you wrote !testword"
- alias: 'React to an introduction'
- alias: "React to an introduction"
triggers: triggers:
trigger: event - trigger: event
event_type: matrix_command event_type: matrix_command
event_data: event_data:
command: introduction command: introduction
actions: actions:
action: notify.matrix_notify - action: notify.matrix_notify
data: data:
message: "Hello {{trigger.event.data.args['name']}}" message: "Hello {{trigger.event.data.args['name']}}"
``` ```
{% endraw %} {% endraw %}
@ -197,12 +198,12 @@ Supported formats are: `text` (default), and `html`.
```yaml ```yaml
# Example of notification as HTML # Example of notification as HTML
actions: actions:
action: notify.matrix_notify - action: notify.matrix_notify
data:
message: >-
<h1>Hello, world!</h1>
data: data:
format: "html" message: >-
<h1>Hello, world!</h1>
data:
format: "html"
``` ```
### Images in notification ### Images in notification
@ -212,12 +213,12 @@ It is possible to send images with notifications. To do so, add a list of paths
```yaml ```yaml
# Example of notification with images # Example of notification with images
actions: actions:
action: notify.matrix_notify - action: notify.matrix_notify
data:
message: "Test with images"
data: data:
images: message: "Test with images"
- /path/to/picture.jpg data:
images:
- /path/to/picture.jpg
``` ```
{% important %} {% important %}

View File

@ -69,12 +69,12 @@ The `play_media` function can be used in scripts to change channels:
# #
change_channel: change_channel:
sequence: sequence:
action: media_player.play_media - action: media_player.play_media
target: target:
entity_id: media_player.mediaroom_stb entity_id: media_player.mediaroom_stb
data: data:
media_content_id: "{{ channel_number }}" media_content_id: "{{ channel_number }}"
media_content_type: "channel" media_content_type: "channel"
``` ```
{% endraw %} {% endraw %}
@ -88,12 +88,12 @@ The `play_media` function can also be used to trigger actions on the set-up-box
# #
press_button: press_button:
sequence: sequence:
action: media_player.play_media - action: media_player.play_media
target: target:
entity_id: media_player.mediaroom_stb entity_id: media_player.mediaroom_stb
data: data:
media_content_id: "{{ action }}" media_content_id: "{{ action }}"
media_content_type: "mediaroom" media_content_type: "mediaroom"
``` ```
{% endraw %} {% endraw %}

View File

@ -92,9 +92,9 @@ Example automation
automation: automation:
- alias: "Alert me about weather warnings" - alias: "Alert me about weather warnings"
triggers: triggers:
trigger: state - trigger: state
entity_id: binary_sensor.meteoalarm entity_id: binary_sensor.meteoalarm
from: 'off' from: "off"
actions: actions:
- action: notify.notify - action: notify.notify
data: data:

View File

@ -89,10 +89,10 @@ Automations can be triggered on new files created on the Minio server using the
automation: automation:
- alias: "Upload camera snapshot" - alias: "Upload camera snapshot"
triggers: triggers:
trigger: event - trigger: event
event_type: folder_watcher event_type: folder_watcher
event_data: event_data:
event_type: created event_type: created
actions: actions:
- delay: "00:00:01" - delay: "00:00:01"
- action: minio.put - action: minio.put
@ -107,16 +107,16 @@ automation:
- alias: "Download new Minio file" - alias: "Download new Minio file"
triggers: triggers:
- trigger: event - trigger: event
event_type: minio event_type: minio
conditions: [] conditions: []
actions: actions:
- action: minio.get - action: minio.get
data: data:
bucket: "{{trigger.event.data.bucket}}" bucket: "{{trigger.event.data.bucket}}"
key: "{{trigger.event.data.key}}" key: "{{trigger.event.data.key}}"
file_path: "/tmp/{{ trigger.event.data.file_name }}" file_path: "/tmp/{{ trigger.event.data.file_name }}"
``` ```
{% endraw %} {% endraw %}

View File

@ -39,34 +39,36 @@ An example automation:
```yaml ```yaml
automation: automation:
- alias: Notify CallerID - alias: "Notify CallerID"
triggers: triggers:
trigger: state - trigger: state
entity_id: sensor.phone_modem entity_id: sensor.phone_modem
to: "callerid" to: "callerid"
actions: actions:
action: notify.notify - action: notify.notify
data: data:
message: "Call from {{ state_attr('sensor.phone_modem', 'cid_name') }} at {{ state_attr('sensor.phone_modem', 'cid_number') }} " message: "Call from {{ state_attr('sensor.phone_modem', 'cid_name') }} at {{ state_attr('sensor.phone_modem', 'cid_number') }} "
- alias: Notify CallerID webui
- alias: "Notify CallerID webui"
triggers: triggers:
trigger: state - trigger: state
entity_id: sensor.phone_modem entity_id: sensor.phone_modem
to: "callerid" to: "callerid"
actions: actions:
action: persistent_notification.create - action: persistent_notification.create
data: data:
title: "Call from" title: "Call from"
message: "{{ state_attr('sensor.phone_modem', 'cid_time').strftime("%I:%M %p") }} {{ state_attr('sensor.phone_modem', 'cid_name') }} {{ state_attr('sensor.phone_modem', 'cid_number') }} " message: "{{ state_attr('sensor.phone_modem', 'cid_time').strftime("%I:%M %p") }} {{ state_attr('sensor.phone_modem', 'cid_name') }} {{ state_attr('sensor.phone_modem', 'cid_number') }} "
- alias: Say CallerID
- alias: "Say CallerID"
triggers: triggers:
trigger: state - trigger: state
entity_id: sensor.phone_modem entity_id: sensor.phone_modem
to: "callerid" to: "callerid"
actions: actions:
action: tts.google_say - action: tts.google_say
data: data:
message: "Call from {{ state_attr('sensor.phone_modem', 'cid_name') }}" message: "Call from {{ state_attr('sensor.phone_modem', 'cid_name') }}"
``` ```
{% endraw %} {% endraw %}

View File

@ -212,8 +212,7 @@ You only have to create one automation with only one Motionblinds cover as entit
Example YAML automation for custom polling interval (every minute): Example YAML automation for custom polling interval (every minute):
```yaml ```yaml
alias: Motionblinds polling automation alias: "Motionblinds polling automation"
mode: single
triggers: triggers:
- trigger: time_pattern - trigger: time_pattern
minutes: "/1" minutes: "/1"

View File

@ -61,8 +61,7 @@ Since Motionblinds Bluetooth motors require a Bluetooth connection to control th
This can also be automated using a YAML automation. For instance, the following automation connects to your Motionblind every 24 hours to update its state in Home Assistant: This can also be automated using a YAML automation. For instance, the following automation connects to your Motionblind every 24 hours to update its state in Home Assistant:
```yaml ```yaml
alias: Motionblinds Bluetooth polling automation alias: "Motionblinds Bluetooth polling automation"
mode: single
triggers: triggers:
- trigger: time_pattern - trigger: time_pattern
hours: "/24" hours: "/24"

View File

@ -1063,14 +1063,14 @@ Use as [`script`](/integrations/script/) in automations.
automation: automation:
alias: "Send me a message when I get home" alias: "Send me a message when I get home"
triggers: triggers:
trigger: state - trigger: state
entity_id: device_tracker.me entity_id: device_tracker.me
to: "home" to: "home"
actions: actions:
action: script.notify_mqtt - action: script.notify_mqtt
data: data:
target: "me" target: "me"
message: "I'm home" message: "I'm home"
script: script:
notify_mqtt: notify_mqtt:

View File

@ -410,7 +410,6 @@ data:
data: data:
image: "{{ trigger.event.data.attachment.image }}" image: "{{ trigger.event.data.attachment.image }}"
video: "{{ trigger.event.data.attachment.video }}" video: "{{ trigger.event.data.attachment.video }}"
mode: single
``` ```
{% endraw %} {% endraw %}

View File

@ -205,13 +205,11 @@ Example:
- alias: "Netatmo event example" - alias: "Netatmo event example"
description: "Count all events pushed by the Netatmo API" description: "Count all events pushed by the Netatmo API"
triggers: triggers:
- event_data: {} - trigger: event
event_type: netatmo_event event_type: netatmo_event
trigger: event
actions: actions:
- data: {} - action: counter.increment
entity_id: counter.event_counter entity_id: counter.event_counter
action: counter.increment
``` ```
Example: Example:
@ -223,17 +221,17 @@ Example:
- alias: "Motion at home" - alias: "Motion at home"
description: "Motion detected at home" description: "Motion detected at home"
triggers: triggers:
- event_type: netatmo_event - trigger: event
trigger: event event_type: netatmo_event
event_data: event_data:
type: movement type: movement
actions: actions:
- data: - action: persistent_notification.create
data:
message: > message: >
{{ trigger.event.data["data"]["message"] }} {{ trigger.event.data["data"]["message"] }}
at {{ trigger.event.data["data"]["home_name"] }} at {{ trigger.event.data["data"]["home_name"] }}
title: Netatmo event title: "Netatmo event"
action: persistent_notification.create
``` ```
{% endraw %} {% endraw %}
@ -247,17 +245,17 @@ Example:
- alias: "Motion at home" - alias: "Motion at home"
description: "Motion detected at home" description: "Motion detected at home"
triggers: triggers:
- event_type: netatmo_event - trigger: event
trigger: event event_type: netatmo_event
event_data: event_data:
type: human # other possible types: animal, vehicle type: human # other possible types: animal, vehicle
actions: actions:
- data: - action: persistent_notification.create
data:
message: > message: >
{{ trigger.event.data["data"]["message"] }} {{ trigger.event.data["data"]["message"] }}
at {{ trigger.event.data["data"]["home_name"] }} at {{ trigger.event.data["data"]["home_name"] }}
title: Netatmo event title: Netatmo event
action: persistent_notification.create
``` ```
{% endraw %} {% endraw %}
@ -271,24 +269,24 @@ Example:
- alias: "Door or window open or movement" - alias: "Door or window open or movement"
description: "Notifies which door or window is open or was moved" description: "Notifies which door or window is open or was moved"
triggers: triggers:
- event_type: netatmo_event - trigger: event
trigger: event event_type: netatmo_event
event_data: event_data:
type: tag_open type: tag_open
- event_type: netatmo_event - trigger: event
trigger: event event_type: netatmo_event
event_data: event_data:
type: tag_big_move type: tag_big_move
- event_type: netatmo_event - trigger: event
trigger: event event_type: netatmo_event
event_data: event_data:
type: tag_small_move type: tag_small_move
actions: actions:
- data: - action: persistent_notification.create
data:
message: > message: >
{{ trigger.event.data["data"]["message"] }} {{ trigger.event.data["data"]["message"] }}
title: Netatmo event title: "Netatmo event"
action: persistent_notification.create
``` ```
{% endraw %} {% endraw %}

View File

@ -31,8 +31,7 @@ The state is the last reading from Nightscout, and you can see other information
### Example automation ### Example automation
```yaml ```yaml
- id: "1234567890123" - alias: "overnight_low_kitchen_lights"
alias: "overnight_low_kitchen_lights"
description: Turn on the lights in the kitchen if my blood sugar drops low overnight description: Turn on the lights in the kitchen if my blood sugar drops low overnight
triggers: triggers:
- trigger: numeric_state - trigger: numeric_state

View File

@ -127,9 +127,9 @@ The notify integration supports specifying [templates](/docs/configuration/templ
```yaml ```yaml
actions: actions:
action: notify.persistent_notification - action: notify.persistent_notification
data: data:
message: "You have {{ states('todo.shopping_list') }} items on your shopping list." message: "You have {{ states('todo.shopping_list') }} items on your shopping list."
``` ```
{% endraw %} {% endraw %}
@ -138,9 +138,9 @@ actions:
```yaml ```yaml
actions: actions:
action: notify.persistent_notification - action: notify.persistent_notification
data: data:
message: "The sun is {% if is_state('sun.sun', 'above_horizon') %}up{% else %}down{% endif %}!" message: "The sun is {% if is_state('sun.sun', 'above_horizon') %}up{% else %}down{% endif %}!"
``` ```
{% endraw %} {% endraw %}

View File

@ -52,15 +52,15 @@ Example automation to send a Telegram message on a completed download:
```yaml ```yaml
- alias: "Completed Torrent" - alias: "Completed Torrent"
triggers: triggers:
trigger: event - trigger: event
event_type: nzbget_download_complete event_type: nzbget_download_complete
- event_data: event_data:
category: tv category: tv
actions: actions:
action: notify.telegram_notifier - action: notify.telegram_notifier
data: data:
title: "Download completed!" title: "Download completed!"
message: "{{trigger.event.data.name}}" message: "{{trigger.event.data.name}}"
``` ```
{% endraw %} {% endraw %}

View File

@ -149,9 +149,9 @@ automation:
template: template:
- triggers: - triggers:
alias: "Update image when a new weather image is generated" - alias: "Update image when a new weather image is generated"
trigger: event trigger: event
event_type: new_weather_image event_type: new_weather_image
image: image:
name: "AI generated image of New York" name: "AI generated image of New York"
url: "{{ trigger.event.data.url }}" url: "{{ trigger.event.data.url }}"

View File

@ -60,12 +60,12 @@ To receive notifications of the entering flights using the [Home Assistant Compa
automation: automation:
- alias: "Flight entry notification" - alias: "Flight entry notification"
triggers: triggers:
trigger: event - trigger: event
event_type: opensky_entry event_type: opensky_entry
actions: actions:
action: notify.mobile_app_<device_name> - action: notify.mobile_app_<device_name>
data: data:
message: "Flight entry of {{ trigger.event.data.callsign }}" message: "Flight entry of {{ trigger.event.data.callsign }}"
``` ```
{% endraw %} {% endraw %}
@ -77,18 +77,18 @@ One can also get a direct link to the OpenSky website to see the flight using th
automation: automation:
- alias: "Flight entry notification" - alias: "Flight entry notification"
triggers: triggers:
trigger: event - trigger: event
event_type: opensky_entry event_type: opensky_entry
actions: actions:
action: notify.mobile_app_<device_name> - action: notify.mobile_app_<device_name>
data:
message: "Flight entry of {{ trigger.event.data.callsign }}"
data: data:
actions: message: "Flight entry of {{ trigger.event.data.callsign }}"
- action: URI data:
title: Track the flight actions:
uri: >- - action: URI
https://opensky-network.org/aircraft-profile?icao24={{ title: "Track the flight"
trigger.event.data.icao24 }} uri: >-
https://opensky-network.org/aircraft-profile?icao24={{
trigger.event.data.icao24 }}
``` ```
{% endraw %} {% endraw %}

View File

@ -102,17 +102,17 @@ horizon:
automation: automation:
- alias: "Update OpenUV" - alias: "Update OpenUV"
triggers: triggers:
trigger: time_pattern - trigger: time_pattern
minutes: "/20" minutes: "/20"
conditions: conditions:
condition: numeric_state - condition: numeric_state
entity_id: sun.sun entity_id: sun.sun
value_template: "{{ state.attributes.elevation }}" value_template: "{{ state.attributes.elevation }}"
above: 10 above: 10
actions: actions:
action: homeassistant.update_entity - action: homeassistant.update_entity
target: target:
entity_id: sensor.LATITUDE_LONGITUDE_current_uv_index entity_id: sensor.LATITUDE_LONGITUDE_current_uv_index
``` ```
{% endraw %} {% endraw %}
@ -122,12 +122,12 @@ Update the protection window once a day at 12:00pm:
automation: automation:
- alias: "Update OpenUV" - alias: "Update OpenUV"
triggers: triggers:
trigger: time - trigger: time
at: "12:00:00" at: "12:00:00"
actions: actions:
action: homeassistant.update_entity - action: homeassistant.update_entity
target: target:
entity_id: binary_sensor.LATITUDE_LONGITUDE_protection_window entity_id: binary_sensor.LATITUDE_LONGITUDE_protection_window
``` ```
To perform an optimal amount of API calls in locations where the amount of daylight To perform an optimal amount of API calls in locations where the amount of daylight
@ -165,12 +165,12 @@ automation:
) >= timedelta(hours = 0, minutes = 40) ) >= timedelta(hours = 0, minutes = 40)
}} }}
actions: actions:
action: homeassistant.update_entity - action: homeassistant.update_entity
target: target:
entity_id: entity_id:
# Update both UV and protection window data: # Update both UV and protection window data:
- binary_sensor.LATITUDE_LONGITUDE_protection_window - binary_sensor.LATITUDE_LONGITUDE_protection_window
- sensor.LATITUDE_LONGITUDE_current_uv_index - sensor.LATITUDE_LONGITUDE_current_uv_index
``` ```
{% endraw %} {% endraw %}

View File

@ -57,10 +57,10 @@ Here is how an [action](/docs/automation/action) of your [automation setup](/get
```yaml ```yaml
actions: actions:
action: persistent_notification.create - action: persistent_notification.create
data: data:
message: "Your message goes here" message: "Your message goes here"
title: "Custom subject" title: "Custom subject"
``` ```
If you want to show some runtime information, you have to use [templates](/docs/configuration/templating/). If you want to show some runtime information, you have to use [templates](/docs/configuration/templating/).
@ -69,11 +69,11 @@ If you want to show some runtime information, you have to use [templates](/docs/
```yaml ```yaml
actions: actions:
action: persistent_notification.create - action: persistent_notification.create
data: data:
title: > title: >
Thermostat is {{ state_attr('climate.thermostat', 'hvac_action') }} Thermostat is {{ state_attr('climate.thermostat', 'hvac_action') }}
message: "Temperature {{ state_attr('climate.thermostat', 'current_temperature') }}" message: "Temperature {{ state_attr('climate.thermostat', 'current_temperature') }}"
``` ```
{% endraw %} {% endraw %}
@ -88,16 +88,16 @@ This action allows you to remove a notifications by script or automation.
```yaml ```yaml
actions: actions:
action: persistent_notification.dismiss - action: persistent_notification.dismiss
data: data:
notification_id: "1234" notification_id: "1234"
``` ```
The `persistent_notification.dismiss_all` action allows you to remove all notifications. The `persistent_notification.dismiss_all` action allows you to remove all notifications.
```yaml ```yaml
actions: actions:
action: persistent_notification.dismiss_all - action: persistent_notification.dismiss_all
``` ```
### Markdown support ### Markdown support

View File

@ -77,7 +77,7 @@ In addition to the item count, the last added media item (movie, album, or episo
Example automation to use the `last_added_item` attribute on library sensors to notify when new media has been added: Example automation to use the `last_added_item` attribute on library sensors to notify when new media has been added:
```yaml ```yaml
alias: Plex - New media added alias: "Plex - New media added"
triggers: triggers:
- trigger: state - trigger: state
entity_id: sensor.plex_library_movies entity_id: sensor.plex_library_movies

View File

@ -121,8 +121,8 @@ automation:
event_type: point_webhook_received event_type: point_webhook_received
event_data: {} event_data: {}
conditions: conditions:
condition: template - condition: template
value_template: "{{ trigger.event.data.event.type == 'short_button_press' }}" value_template: "{{ trigger.event.data.event.type == 'short_button_press' }}"
actions: actions:
- action: persistent_notification.create - action: persistent_notification.create
data: data:

View File

@ -86,12 +86,12 @@ To use notifications, please see the [getting started with automation page](/get
```yaml ```yaml
actions: actions:
action: notify.NOTIFIER_NAME - action: notify.NOTIFIER_NAME
data:
title: Send URL
message: This is an url
data: data:
url: google.com title: "Send URL"
message: "This is an url"
data:
url: "google.com"
``` ```
- `url` (*Required*): Page URL to send with Pushbullet. - `url` (*Required*): Page URL to send with Pushbullet.
@ -100,12 +100,12 @@ actions:
```yaml ```yaml
actions: actions:
action: notify.NOTIFIER_NAME - action: notify.NOTIFIER_NAME
data:
title: Send file
message: This is a file
data: data:
file: /path/to/my/file title: "Send file"
message: "This is a file"
data:
file: /path/to/my/file
``` ```
- `file` (*Required*): File to send with Pushbullet. - `file` (*Required*): File to send with Pushbullet.
@ -114,12 +114,12 @@ actions:
```yaml ```yaml
actions: actions:
action: notify.NOTIFIER_NAME - action: notify.NOTIFIER_NAME
data:
title: Send file
message: This is a file URL
data: data:
file_url: https://cdn.pixabay.com/photo/2014/06/03/19/38/test-361512_960_720.jpg title: "Send file"
message: "This is a file URL"
data:
file_url: https://cdn.pixabay.com/photo/2014/06/03/19/38/test-361512_960_720.jpg
``` ```
- `file_url` (*Required*): File to send with Pushbullet. - `file_url` (*Required*): File to send with Pushbullet.
@ -127,8 +127,8 @@ actions:
### Single target ### Single target
```yaml ```yaml
actions: actions:
action: notify.NOTIFIER_NAME - action: notify.NOTIFIER_NAME
data: data:
title: "Send to one device" title: "Send to one device"
message: "This only goes to one specific device" message: "This only goes to one specific device"

View File

@ -47,66 +47,66 @@ Message to two devices with formatted text.
```yaml ```yaml
actions: actions:
action: notify.notify - action: notify.notify
data:
title: "Test to 2 devices"
message: "Attention [b]bold[/b] text[br][url=https://www.pushsafer.com]Link to Pushsafer[/url]"
data: data:
icon: "2" title: "Test to 2 devices"
iconcolor: "#FF0000" message: "Attention [b]bold[/b] text[br][url=https://www.pushsafer.com]Link to Pushsafer[/url]"
sound: "2" data:
vibration: "1" icon: "2"
url: "https://www.home-assistant.io/" iconcolor: "#FF0000"
urltitle: "Open Home Assistant" sound: "2"
time2live: "0" vibration: "1"
url: "https://www.home-assistant.io/"
urltitle: "Open Home Assistant"
time2live: "0"
``` ```
Message to one device with formatted text and image from an external URL. Message to one device with formatted text and image from an external URL.
```yaml ```yaml
actions: actions:
action: notify.notify - action: notify.notify
data:
title: "Test to 1 device with image from an url"
message: "Attention [i]italic[/i] Text[br][url=https://www.home-assistant.io/]Testlink[/url]"
data: data:
icon: "14" title: "Test to 1 device with image from an url"
iconcolor: "#FFFF00" message: "Attention [i]italic[/i] Text[br][url=https://www.home-assistant.io/]Testlink[/url]"
sound: "22" data:
vibration: "31" icon: "14"
url: "https://www.home-assistant.io/" iconcolor: "#FFFF00"
urltitle: "Open Home Assistant" sound: "22"
time2live: "60" vibration: "31"
picture1: url: "https://www.home-assistant.io/"
url: "https://www.home-assistant.io/images/integrations/alexa/alexa-512x512.png" urltitle: "Open Home Assistant"
time2live: "60"
picture1:
url: "https://www.home-assistant.io/images/integrations/alexa/alexa-512x512.png"
``` ```
Message to two devices and one device group with formatted text and local image. Message to two devices and one device group with formatted text and local image.
```yaml ```yaml
actions: actions:
action: notify.notify - action: notify.notify
data:
title: "Test to 3 devices with local image"
message: "Attention [i]italic[/i] Text[br][url=https://www.home-assistant.io/]Testlink[/url]"
target: ["1111","2222","gs3333"],
data: data:
icon: "20" title: "Test to 3 devices with local image"
iconcolor: "#FF00FF" message: "Attention [i]italic[/i] Text[br][url=https://www.home-assistant.io/]Testlink[/url]"
sound: "33" target: ["1111","2222","gs3333"],
vibration: "0" data:
url: "https://www.home-assistant.io/" icon: "20"
urltitle: "Open Home Assistant" iconcolor: "#FF00FF"
time2live: "10" sound: "33"
priority: "2" vibration: "0"
retry: "60" url: "https://www.home-assistant.io/"
expire: "600" urltitle: "Open Home Assistant"
confirm: "10" time2live: "10"
answer: "1" priority: "2"
answeroptions: "yes|no|maybe" retry: "60"
answerforce: "1" expire: "600"
picture1: { confirm: "10"
path: "C:\\Users\\Kevin\\AppData\\Roaming\\.homeassistant\\image-760-testimage.jpg" answer: "1"
answeroptions: "yes|no|maybe"
answerforce: "1"
picture1: {
path: "C:\\Users\\Kevin\\AppData\\Roaming\\.homeassistant\\image-760-testimage.jpg"
``` ```
To customize your push-notification you can take a look at the [Pushsafer API description](https://www.pushsafer.com/en/pushapi). To customize your push-notification you can take a look at the [Pushsafer API description](https://www.pushsafer.com/en/pushapi).

View File

@ -109,8 +109,8 @@ QwikSwitch devices (i.e., transmitter buttons) will fire events on the Home Assi
automation: automation:
- alias: "Action - Respond to A button press" - alias: "Action - Respond to A button press"
triggers: triggers:
trigger: event - trigger: event
event_type: qwikswitch.button.@12df34 event_type: qwikswitch.button.@12df34
``` ```
`event_type` names should be in the format **qwikswitch.button.@_QS_id_**. where **@_QS_id_** will be captured in the Home Assistant log when pressing the button. Alternatively, you can also get the device ID from the QS Mobile application or by using the listen API call by browsing to `http://127.0.0.1:2020/&listen` and then pressing the button. `event_type` names should be in the format **qwikswitch.button.@_QS_id_**. where **@_QS_id_** will be captured in the Home Assistant log when pressing the button. Alternatively, you can also get the device ID from the QS Mobile application or by using the listen API call by browsing to `http://127.0.0.1:2020/&listen` and then pressing the button.

View File

@ -243,7 +243,6 @@ actions:
data: data:
keep_days: 5 keep_days: 5
entity_id: sensor.power_sensor_0 entity_id: sensor.power_sensor_0
mode: single
``` ```
### Action `disable` ### Action `disable`

Some files were not shown because too many files have changed in this diff Show More