diff --git a/source/_docs/automation/action.markdown b/source/_docs/automation/action.markdown index 85705f0cd4f..33fdc8b4302 100644 --- a/source/_docs/automation/action.markdown +++ b/source/_docs/automation/action.markdown @@ -14,10 +14,10 @@ You can also perform the action to activate [a scene](/integrations/scene/) whic ```yaml automation: # Change the light in the kitchen and living room to 150 brightness and color red. - trigger: + triggers: - platform: sun event: sunset - action: + actions: - action: light.turn_on target: entity_id: @@ -29,13 +29,13 @@ automation: automation 2: # Notify me on my mobile phone of an event - trigger: + triggers: - platform: sun event: sunset offset: -00:30 variables: notification_action: notify.paulus_iphone - action: + actions: # Actions are scripts so can also be a list of actions - action: "{{ notification_action }}" data: @@ -53,11 +53,11 @@ Conditions can also be part of an action. You can combine multiple actions and c ```yaml automation: - alias: "Office at evening" - trigger: + triggers: - platform: state entity_id: sensor.office_occupancy to: "on" - action: + actions: - action: notify.notify data: message: "Testing conditional actions" diff --git a/source/_docs/automation/condition.markdown b/source/_docs/automation/condition.markdown index 6007e08d64a..234128a7ebb 100644 --- a/source/_docs/automation/condition.markdown +++ b/source/_docs/automation/condition.markdown @@ -16,11 +16,11 @@ Example of using condition: ```yaml automation: - alias: "Turn on office lights" - trigger: + triggers: - platform: state entity_id: sensor.office_motion_sensor to: "on" - condition: + conditions: - or: - condition: numeric_state entity_id: sun.sun @@ -29,7 +29,7 @@ automation: - condition: numeric_state entity_id: sensor.office_lux_sensor below: 10 - action: + actions: - action: scene.turn_on target: entity_id: scene.office_lights @@ -44,12 +44,12 @@ The `condition` option of an automation, also accepts a single condition templat ```yaml automation: - alias: "Turn on office lights" - trigger: + triggers: - platform: state entity_id: sensor.office_motion_sensor to: "on" condition: "{{ state_attr('sun.sun', 'elevation') < 4 }}" - action: + actions: - action: scene.turn_on target: entity_id: scene.office_lights diff --git a/source/_docs/automation/modes.markdown b/source/_docs/automation/modes.markdown index 83fc69517a6..0035254f178 100644 --- a/source/_docs/automation/modes.markdown +++ b/source/_docs/automation/modes.markdown @@ -31,9 +31,9 @@ Some automations you only want to run every 5 minutes. This can be achieved usin automation: - mode: single max_exceeded: silent - trigger: + triggers: - ... - action: + actions: - ... - delay: 300 # seconds (=5 minutes) ``` @@ -46,8 +46,8 @@ Sometimes an automation is doing an action on a device that does not support mul automation: - mode: queued max: 25 - trigger: + triggers: - ... - action: + actions: - ... ``` diff --git a/source/_docs/automation/templating.markdown b/source/_docs/automation/templating.markdown index 514b5d96deb..7a39e95976d 100644 --- a/source/_docs/automation/templating.markdown +++ b/source/_docs/automation/templating.markdown @@ -201,11 +201,11 @@ These are the properties available for a [Zone trigger](/docs/automation/trigger ```yaml # Example configuration.yaml entries automation: - trigger: + triggers: - platform: state entity_id: device_tracker.paulus id: paulus_device - action: + actions: - action: notify.notify data: message: > @@ -215,17 +215,17 @@ automation: This was triggered by {{ trigger.id }} automation 2: - trigger: + triggers: - platform: mqtt topic: "/notify/+" - action: + actions: action: > notify.{{ trigger.topic.split('/')[-1] }} data: message: "{{ trigger.payload }}" automation 3: - trigger: + triggers: # Multiple entities for which you want to perform the same action. - platform: state entity_id: @@ -235,14 +235,14 @@ automation 3: to: "on" # Trigger when someone leaves one of those lights on for 10 minutes. for: "00:10:00" - action: + actions: - action: light.turn_off target: # Turn off whichever entity triggered the automation. entity_id: "{{ trigger.entity_id }}" automation 4: - trigger: + triggers: # When an NFC tag is scanned by Home Assistant... - platform: event event_type: tag_scanned @@ -251,11 +251,11 @@ automation 4: user_id: - 06cbf6deafc54cf0b2ffa49552a396ba - 2df8a2a6e0be4d5d962aad2d39ed4c9c - condition: + conditions: # Check NFC tag (ID) is the one by the front door - condition: template value_template: "{{ trigger.event.data.tag_id == '8b6d6755-b4d5-4c23-818b-cf224d221ab7'}}" - action: + actions: # Turn off various lights - action: light.turn_off target: diff --git a/source/_docs/automation/trigger.markdown b/source/_docs/automation/trigger.markdown index 9ae4bbbfb4f..27244fa4551 100644 --- a/source/_docs/automation/trigger.markdown +++ b/source/_docs/automation/trigger.markdown @@ -46,7 +46,7 @@ This video tutorial explains how trigger IDs work. ```yaml automation: - trigger: + triggers: - platform: event event_type: "MY_CUSTOM_EVENT" id: "custom_event" @@ -74,7 +74,7 @@ The second variant is setting variables that are available when attaching a trig automation: trigger_variables: my_event: example_event - trigger: + triggers: - platform: event # Able to use `trigger_variables` event_type: "{{ my_event }}" @@ -93,7 +93,7 @@ Events can be fired by integrations or via the API. There is no limitation to th ```yaml automation: - trigger: + triggers: - platform: event event_type: "MY_CUSTOM_EVENT" # optional @@ -111,7 +111,7 @@ event that contain no, or similar, data and contexts. ```yaml automation: - trigger: + triggers: - platform: event event_type: - automation_reloaded @@ -132,7 +132,7 @@ automation: sub_event: ABC node: ac value: on - trigger: + triggers: - platform: event event_type: "{{ 'MY_CUSTOM_EVENT_' ~ sub_event }}" ``` @@ -145,7 +145,7 @@ Fires when Home Assistant starts up or shuts down. ```yaml automation: - trigger: + triggers: - platform: homeassistant # Event can also be 'shutdown' event: start @@ -161,7 +161,7 @@ Fires when a specific message is received on given MQTT topic. Optionally can ma ```yaml automation: - trigger: + triggers: - platform: mqtt topic: "living_room/switch/ac" # Optional @@ -176,7 +176,7 @@ The trigger in the example below will trigger only when the message received on ```yaml automation: - trigger: + triggers: - platform: mqtt topic: "living_room/switch/ac" payload: "on" @@ -199,7 +199,7 @@ automation: room: "living_room" node: "ac" value: "on" - trigger: + triggers: - platform: mqtt topic: "{{ room ~ '/switch/' ~ node}}" # Optional @@ -222,7 +222,7 @@ If the current state of your entity is `50` and you set the threshold to `below: ```yaml automation: - trigger: + triggers: - platform: numeric_state entity_id: sensor.temperature # If given, will trigger when the value of the given attribute for the given entity changes.. @@ -247,7 +247,7 @@ When the `attribute` option is specified the trigger is compared to the given `a ```yaml automation: - trigger: + triggers: - platform: numeric_state entity_id: climate.kitchen attribute: current_temperature @@ -264,7 +264,7 @@ The state of the entity can be referenced like this: ```yaml automation: - trigger: + triggers: - platform: numeric_state entity_id: sensor.temperature value_template: "{{ state.state | float * 9 / 5 + 32 }}" @@ -279,7 +279,7 @@ Attributes of the entity can be referenced like this: ```yaml automation: - trigger: + triggers: - platform: numeric_state entity_id: climate.kitchen value_template: "{{ state.attributes.current_temperature - state.attributes.temperature_set_point }}" @@ -299,7 +299,7 @@ However, the comparison will only be made when the entity specified in the trigg ```yaml automation: - trigger: + triggers: - platform: numeric_state entity_id: sensor.outside_temperature # Other entity ids can be specified for above and/or below thresholds @@ -312,7 +312,7 @@ The `for:` can also be specified as `HH:MM:SS` like this: ```yaml automation: - trigger: + triggers: - platform: numeric_state entity_id: sensor.temperature # At least one of the following required @@ -331,7 +331,7 @@ You can also use templates in the `for` option. ```yaml automation: - trigger: + triggers: - platform: numeric_state entity_id: - sensor.temperature_1 @@ -340,7 +340,7 @@ automation: for: minutes: "{{ states('input_number.high_temp_min')|int }}" seconds: "{{ states('input_number.high_temp_sec')|int }}" - action: + actions: - action: persistent_notification.create data: message: > @@ -378,7 +378,7 @@ This automation triggers if either Paulus or Anne-Therese are home for one minut ```yaml automation: - trigger: + triggers: - platform: state entity_id: - device_tracker.paulus @@ -398,7 +398,7 @@ It's possible to give a list of `from` states or `to` states: ```yaml automation: - trigger: + triggers: - platform: state entity_id: vacuum.test from: @@ -411,7 +411,7 @@ If you want to trigger on all state changes, but not on attribute changes, you c ```yaml automation: - trigger: + triggers: - platform: state entity_id: vacuum.test to: @@ -421,7 +421,7 @@ If you want to trigger on all state changes *except* specific ones, use `not_fro ```yaml automation: - trigger: + triggers: - platform: state entity_id: vacuum.test not_from: @@ -442,7 +442,7 @@ For example, this trigger only fires when the boiler has been heating for 10 min ```yaml automation: - trigger: + triggers: - platform: state entity_id: climate.living_room attribute: hvac_action @@ -454,7 +454,7 @@ This trigger fires whenever the boiler's `hvac_action` attribute changes: ```yaml automation: - trigger: + triggers: - platform: state entity_id: climate.living_room attribute: hvac_action @@ -469,7 +469,7 @@ state for 30 seconds: ```yaml automation: - trigger: + triggers: - platform: state entity_id: light.office # Must stay "on" for 30 seconds @@ -488,7 +488,7 @@ the time specified, but doesn't care about "playing" or "paused". ```yaml automation: - trigger: + triggers: - platform: state entity_id: media_player.kitchen # Not "off" for 30 minutes @@ -504,7 +504,7 @@ same for `for` the time specified, regardless of the current state value. ```yaml automation: - trigger: + triggers: - platform: state entity_id: media_player.kitchen # The media player remained in its current state for 1 hour @@ -517,7 +517,7 @@ You can also use templates in the `for` option. ```yaml automation: - trigger: + triggers: - platform: state entity_id: - device_tracker.paulus @@ -526,7 +526,7 @@ automation: for: minutes: "{{ states('input_number.lock_min')|int }}" seconds: "{{ states('input_number.lock_sec')|int }}" - action: + actions: - action: lock.lock target: entity_id: lock.my_place @@ -556,7 +556,7 @@ Since the duration of twilight is different throughout the year, it is recommend ```yaml automation: - trigger: + triggers: - platform: sun # Possible values: sunset, sunrise event: sunset @@ -573,13 +573,13 @@ Sometimes you may want more granular control over an automation than simply suns ```yaml automation: - alias: "Exterior Lighting on when dark outside" - trigger: + triggers: - platform: numeric_state entity_id: sun.sun attribute: elevation # Can be a positive or negative number below: -4.0 - action: + actions: - action: switch.turn_on target: entity_id: switch.exterior_lighting @@ -607,7 +607,7 @@ scanned using the Home Assistant Companion mobile application. ```yaml automation: - trigger: + triggers: - platform: tag tag_id: A7-6B-90-5F ``` @@ -617,7 +617,7 @@ device/scanner by setting the `device_id`: ```yaml automation: - trigger: + triggers: - platform: tag tag_id: A7-6B-90-5F device_id: 0e19cd3cf2b311ea88f469a7512c307d @@ -627,7 +627,7 @@ Or trigger on multiple possible devices for multiple tags: ```yaml automation: - trigger: + triggers: - platform: tag tag_id: - "A7-6B-90-5F" @@ -649,7 +649,7 @@ With template triggers you can also evaluate attribute changes by using is_state ```yaml automation: - trigger: + triggers: - platform: template value_template: "{% if is_state('device_tracker.paulus', 'home') %}true{% endif %}" @@ -665,7 +665,7 @@ You can also use templates in the `for` option. ```yaml automation: - trigger: + triggers: - platform: template value_template: "{{ is_state('device_tracker.paulus', 'home') }}" for: @@ -694,7 +694,7 @@ A string that represents a time to fire on each day. Can be specified as `HH:MM` ```yaml automation: - - trigger: + - triggers: - platform: time # Military time format. This trigger will fire at 3:32 PM at: "15:32:00" @@ -714,11 +714,11 @@ The entity ID of an [input datetime](/integrations/input_datetime/). ```yaml automation: - - trigger: + - triggers: - platform: state entity_id: binary_sensor.motion to: "on" - action: + actions: - action: climate.turn_on target: entity_id: climate.office @@ -729,10 +729,10 @@ automation: datetime: > {{ (now().timestamp() + 2*60*60) | timestamp_custom('%Y-%m-%d %H:%M:%S') }} - - trigger: + - triggers: - platform: time at: input_datetime.turn_off_ac - action: + actions: - action: climate.turn_off target: entity_id: climate.office @@ -746,10 +746,10 @@ The Entity ID of a [sensor](/integrations/sensor/) with the "timestamp" device c ```yaml automation: - - trigger: + - triggers: - platform: time at: sensor.phone_next_alarm - action: + actions: - action: light.turn_on target: entity_id: light.bedroom @@ -763,12 +763,12 @@ For example, this trigger fires 5 minutes before the phone alarm goes off. ```yaml automation: - - trigger: + - triggers: - platform: time at: entity_id: sensor.phone_next_alarm offset: -00:05:00 - action: + actions: - service: light.turn_on target: entity_id: light.bedroom @@ -784,7 +784,7 @@ Multiple times can be provided in a list. All formats can be intermixed. ```yaml automation: - trigger: + triggers: - platform: time at: - input_datetime.leave_for_work @@ -799,20 +799,20 @@ With the time pattern trigger, you can match if the hour, minute or second of th ```yaml automation: - trigger: + triggers: - platform: time_pattern # Matches every hour at 5 minutes past whole minutes: 5 automation 2: - trigger: + triggers: - platform: time_pattern # Trigger once per minute during the hour of 3 hours: "3" minutes: "*" automation 3: - trigger: + triggers: - platform: time_pattern # You can also match on interval. This will match every 5 minutes minutes: "/5" @@ -828,7 +828,7 @@ Persistent notification triggers are fired when a `persistent_notification` is ` ```yaml automation: - trigger: + triggers: - platform: persistent_notification update_type: - added @@ -844,7 +844,7 @@ Webhook trigger fires when a web request is made to the webhook endpoint: `/api/ ```yaml automation: - trigger: + triggers: - platform: webhook webhook_id: "some_hook_id" allowed_methods: @@ -892,7 +892,7 @@ Zone trigger fires when an entity is entering or leaving the zone. The entity ca ```yaml automation: - trigger: + triggers: - platform: zone entity_id: person.paulus zone: zone.home @@ -911,7 +911,7 @@ This isn't for use with `device_tracker` entities. For those look above at the ` ```yaml automation: - trigger: + triggers: - platform: geo_location source: nsw_rural_fire_service_feed zone: zone.bushfire_alert_zone @@ -938,7 +938,7 @@ An optional time offset can be given to have it fire a set time before or after ```yaml automation: - trigger: + triggers: - platform: calendar # Possible values: start, end event: start @@ -959,7 +959,7 @@ Sentences are allowed to use some basic [template syntax](https://developers.hom ```yaml automation: - trigger: + triggers: - platform: conversation command: - "[it's ]party time" @@ -1002,7 +1002,7 @@ It is possible to specify multiple triggers for the same rule. To do so just pre ```yaml automation: - trigger: + triggers: # first trigger - platform: time_pattern minutes: 5 @@ -1017,7 +1017,7 @@ It is possible to specify multiple entities for the same trigger. To do so add m ```yaml automation: - trigger: + triggers: - platform: state entity_id: - sensor.one @@ -1033,7 +1033,7 @@ To do so, add `enabled: false` to the trigger. For example: ```yaml # Example script with a disabled trigger automation: - trigger: + triggers: # This trigger will not trigger, as it is disabled. # This automation does not run when the sun is set. - enabled: false @@ -1066,7 +1066,7 @@ blueprint: trigger_variables: _enable_number: !input input_number - trigger: + triggers: - platform: sun event_type: sunrise enabled: !input input_boolean @@ -1094,7 +1094,7 @@ blueprint: selector: trigger: -trigger: +triggers: - platform: event event_type: manual_event - triggers: !input usertrigger diff --git a/source/_docs/automation/yaml.markdown b/source/_docs/automation/yaml.markdown index f1f383ee089..688a281b962 100644 --- a/source/_docs/automation/yaml.markdown +++ b/source/_docs/automation/yaml.markdown @@ -15,7 +15,7 @@ automation: !include automations.yaml # Labeled automation block automation kitchen: - - trigger: + - triggers: - platform: ... ``` @@ -52,7 +52,7 @@ trace: default: 5 required: false variables: - description: "Variables that will be available inside your templates, both in `condition` and `action`." + description: "Variables that will be available inside your templates, both in `conditions` and `actions`." required: false default: {} type: map @@ -84,7 +84,7 @@ max_exceeded: required: false type: string default: warning -trigger: +triggers: description: "The trigger(s) which will start the automation. Multiple triggers can be added and the automation will start when any of these triggers trigger." required: true type: list @@ -102,11 +102,11 @@ trigger: PARAMETER_NAME: description: "The value of the variable. Any YAML is valid. Templates can also be used to pass a value to the variable." type: any -condition: +conditions: description: Conditions that have to be `true` to start the automation. By default all conditions listed have to be `true`, you can use [logical conditions](/docs/scripts/conditions/#logical-conditions) to change this default behavior. required: false type: list -action: +actions: description: "The sequence of actions to be performed in the script." required: true type: list @@ -138,7 +138,7 @@ automation my_lights: # Turns on lights 1 hour before sunset if people are home # and if people get home between 16:00-23:00 - alias: "Rule 1 Light on in the evening" - trigger: + triggers: # Prefix the first line of each trigger configuration # with a '-' to enter multiple - platform: sun @@ -147,7 +147,7 @@ automation my_lights: - platform: state entity_id: all to: "home" - condition: + conditions: # Prefix the first line of each condition configuration # with a '-'' to enter multiple - condition: state @@ -156,7 +156,7 @@ automation my_lights: - condition: time after: "16:00:00" before: "23:00:00" - action: + actions: # With a single service entry, we don't need a '-' before service - though you can if you want to - action: homeassistant.turn_on target: @@ -164,26 +164,26 @@ automation my_lights: # Turn off lights when everybody leaves the house - alias: "Rule 2 - Away Mode" - trigger: + triggers: - platform: state entity_id: all to: "not_home" - action: + actions: - action: light.turn_off target: entity_id: all # Notify when Paulus leaves the house in the evening - alias: "Leave Home notification" - trigger: + triggers: - platform: zone event: leave zone: zone.home entity_id: device_tracker.paulus - condition: + conditions: - condition: time after: "20:00" - action: + actions: - action: notify.notify data: message: "Paulus left the house" @@ -191,12 +191,12 @@ automation my_lights: # Send a notification via Pushover with the event of a Xiaomi cube. Custom event from the Xiaomi integration. - alias: "Xiaomi Cube Action" initial_state: false - trigger: + triggers: - platform: event event_type: cube_action event_data: entity_id: binary_sensor.cube_158d000103a3de - action: + actions: - action: notify.pushover data: title: "Cube event detected" @@ -217,7 +217,7 @@ At startup, automations by default restore their last state of when Home Assista automation: - alias: "Automation Name" initial_state: false - trigger: + triggers: - platform: ... ``` @@ -230,7 +230,7 @@ automation: - alias: "Automation Name" trace: stored_traces: 10 - trigger: + triggers: - platform: ... ``` @@ -244,18 +244,18 @@ If you want to migrate your manual automations to use the editor, you'll have to # Example automations.yaml entry. Note, automations.yaml is always a list! - id: my_unique_id # <-- Required for editor to work, for automations created with the editor the id will be automatically generated. alias: "Hello world" - trigger: + triggers: - platform: state entity_id: sun.sun from: below_horizon to: above_horizon - condition: + conditions: - condition: numeric_state entity_id: sensor.temperature above: 17 below: 25 value_template: "{{ float(state.state) + 2 }}" - action: + actions: - action: light.turn_on ``` diff --git a/source/_docs/blueprint/schema.markdown b/source/_docs/blueprint/schema.markdown index f0046a1f33a..d8ffe87bc17 100644 --- a/source/_docs/blueprint/schema.markdown +++ b/source/_docs/blueprint/schema.markdown @@ -267,13 +267,13 @@ blueprint: mode: restart max_exceeded: silent -trigger: +triggers: - platform: state entity_id: !input motion_entity from: "off" to: "on" -action: +actions: - action: light.turn_on target: !input light_target - wait_for_trigger: diff --git a/source/_docs/blueprint/selectors.markdown b/source/_docs/blueprint/selectors.markdown index 5015b5ca26e..4350905f66b 100644 --- a/source/_docs/blueprint/selectors.markdown +++ b/source/_docs/blueprint/selectors.markdown @@ -1381,7 +1381,7 @@ Targets are meant to be used with the `target` property of an action in a script sequence. For example: ```yaml -action: +actions: - action: light.turn_on target: !input lights ``` diff --git a/source/_docs/blueprint/tutorial.markdown b/source/_docs/blueprint/tutorial.markdown index 8ee36b28b4c..1129921f9a5 100644 --- a/source/_docs/blueprint/tutorial.markdown +++ b/source/_docs/blueprint/tutorial.markdown @@ -44,11 +44,11 @@ The automation we're going to use in this tutorial controls a light based on a m {% raw %} ```yaml -trigger: +triggers: platform: state entity_id: binary_sensor.motion_kitchen -action: +actions: action: > {% if trigger.to_state.state == "on" %} light.turn_on @@ -91,7 +91,7 @@ Now we have to decide what steps we want to make configurable. We want to make i Configurable parts in blueprints are called [inputs](/docs/blueprint/schema/#blueprint-inputs). To make the motion sensor entity configurable, we're replacing the entity ID with a custom YAML tag `!input`. This YAML tag has to be combined with the name of the input: ```yaml -trigger: +triggers: platform: state entity_id: !input motion_sensor ``` @@ -103,7 +103,7 @@ Inputs are not limited to strings. They can contain complex objects too. So in t {% raw %} ```yaml -action: +actions: action: > {% if trigger.to_state.state == "on" %} light.turn_on @@ -233,11 +233,11 @@ blueprint: entity: - domain: light -trigger: +triggers: - platform: state entity_id: !input motion_sensor -action: +actions: - action: > {% if trigger.to_state.state == "on" %} light.turn_on diff --git a/source/_docs/configuration/splitting_configuration.markdown b/source/_docs/configuration/splitting_configuration.markdown index 22984656170..9f6c41b9e82 100644 --- a/source/_docs/configuration/splitting_configuration.markdown +++ b/source/_docs/configuration/splitting_configuration.markdown @@ -267,20 +267,20 @@ These work recursively. As an example using `!include_dir_list automation`, will ```yaml automation: - alias: "Automation 1" - trigger: + triggers: platform: state entity_id: device_tracker.iphone to: "home" - action: + actions: action: light.turn_on target: entity_id: light.entryway - alias: "Automation 2" - trigger: + triggers: platform: state entity_id: device_tracker.iphone from: "home" - action: + actions: action: light.turn_off target: entity_id: light.entryway @@ -298,11 +298,11 @@ automation: !include_dir_list automation/presence/ ```yaml alias: "Automation 1" -trigger: +triggers: platform: state entity_id: device_tracker.iphone to: "home" -action: +actions: action: light.turn_on target: entity_id: light.entryway @@ -312,11 +312,11 @@ action: ```yaml alias: "Automation 2" -trigger: +triggers: platform: state entity_id: device_tracker.iphone from: "home" -action: +actions: action: light.turn_off target: entity_id: light.entryway @@ -333,7 +333,7 @@ It is important to note that each file must contain only **one** entry when usin alexa: intents: LocateIntent: - action: + actions: action: notify.pushover data: message: "Your location has been queried via Alexa." @@ -371,7 +371,7 @@ alexa: ```yaml {% raw %} -action: +actions: action: notify.pushover data: message: "Your location has been queried via Alexa." @@ -408,20 +408,20 @@ speech: ```yaml automation: - alias: "Automation 1" - trigger: + triggers: - platform: state entity_id: device_tracker.iphone to: "home" - action: + actions: - action: light.turn_on target: entity_id: light.entryway - alias: "Automation 2" - trigger: + triggers: - platform: state entity_id: device_tracker.iphone from: "home" - action: + actions: - action: light.turn_off target: entity_id: light.entryway @@ -439,20 +439,20 @@ automation: !include_dir_merge_list automation/ ```yaml - alias: "Automation 1" - trigger: + triggers: - platform: state entity_id: device_tracker.iphone to: "home" - action: + actions: - action: light.turn_on target: entity_id: light.entryway - alias: "Automation 2" - trigger: + triggers: - platform: state entity_id: device_tracker.iphone from: "home" - action: + actions: - action: light.turn_off target: entity_id: light.entryway diff --git a/source/_docs/scene.markdown b/source/_docs/scene.markdown index 9f23ca2093d..c6b83c01861 100644 --- a/source/_docs/scene.markdown +++ b/source/_docs/scene.markdown @@ -57,12 +57,12 @@ Scenes can be activated using the action `scene.turn_on` (there is no 'scene.tur ```yaml # Example automation automation: - trigger: + triggers: platform: state entity_id: device_tracker.sweetheart from: "not_home" to: "home" - action: + actions: action: scene.turn_on target: entity_id: scene.romantic @@ -75,12 +75,12 @@ With the `scene.apply` action you are able to apply a scene without first defini ```yaml # Example automation automation: - trigger: + triggers: platform: state entity_id: device_tracker.sweetheart from: "not_home" to: "home" - action: + actions: action: scene.apply data: entities: @@ -104,12 +104,12 @@ light will transition to the scene in 2.5 seconds. ```yaml # Example automation automation: - trigger: + triggers: platform: state entity_id: device_tracker.sweetheart from: "not_home" to: "home" - action: + actions: action: scene.turn_on target: entity_id: scene.romantic diff --git a/source/_docs/scripts.markdown b/source/_docs/scripts.markdown index aefb1391c85..91badaf4499 100644 --- a/source/_docs/scripts.markdown +++ b/source/_docs/scripts.markdown @@ -146,7 +146,7 @@ The `condition` {% term action %} only stops executing the current sequence bloc ```yaml - alias: "Check if Paulus ishome AND temperature is below 20" - condition: + conditions: - condition: state entity_id: "device_tracker.paulus" state: "home" @@ -360,11 +360,11 @@ The following {% term automation %} example shows how to raise a custom event ca ```yaml - alias: "Fire Event" - trigger: + triggers: - platform: state entity_id: switch.kitchen to: "on" - action: + actions: - event: event_light_state_changed event_data: state: "on" @@ -376,10 +376,10 @@ The following {% term automation %} example shows how to capture the custom even ```yaml - alias: "Capture Event" - trigger: + triggers: - platform: event event_type: event_light_state_changed - action: + actions: - action: notify.notify data: message: "kitchen light is turned {{ trigger.event.data.state }}" @@ -524,16 +524,16 @@ _until_ the condition(s) evaluate to true. ```yaml automation: - - trigger: + - triggers: - platform: state entity_id: binary_sensor.xyz to: "on" - condition: + conditions: - condition: state entity_id: binary_sensor.something state: "off" mode: single - action: + actions: - alias: "Repeat the sequence UNTIL the conditions are true" repeat: sequence: @@ -621,12 +621,12 @@ The `choose` {% term action %} can be used like an "if/then/elseif/then.../else" ```yaml # Example with "if", "elif" and "else" automation: - - trigger: + - triggers: - platform: state entity_id: input_boolean.simulate to: "on" mode: restart - action: + actions: - choose: # IF morning - conditions: @@ -664,10 +664,10 @@ For example: ```yaml automation: - - trigger: + - triggers: - platform: state entity_id: input_select.home_mode - action: + actions: - choose: - conditions: > {{ trigger.to_state.state == 'Home' and @@ -706,12 +706,12 @@ When the sun goes below the horizon, the `porch` and `garden` lights must turn o # Example with "if" and "if" automation: - alias: "Turn lights on when the sun gets dim and if some room is occupied" - trigger: + triggers: - platform: numeric_state entity_id: sun.sun attribute: elevation below: 4 - action: + actions: # This must always apply - action: light.turn_on data: @@ -770,11 +770,11 @@ groups themselves. In total, four actions are executed, one after the other. ```yaml automation: - - trigger: + - triggers: - platform: state entity_id: binary_sensor.motion to: "on" - action: + actions: - alias: "Turn on devices" sequence: - action: light.turn_on @@ -807,11 +807,11 @@ The following example shows sending messages out at the same time (in parallel): ```yaml automation: - - trigger: + - triggers: - platform: state entity_id: binary_sensor.motion to: "on" - action: + actions: - parallel: - action: notify.person1 data: @@ -966,7 +966,7 @@ blueprint: selector: boolean: - action: + actions: - delay: 0:35 enabled: !input input_boolean ``` diff --git a/source/_docs/scripts/conditions.markdown b/source/_docs/scripts/conditions.markdown index 34c89afb1d2..76b3450253f 100644 --- a/source/_docs/scripts/conditions.markdown +++ b/source/_docs/scripts/conditions.markdown @@ -19,7 +19,7 @@ All conditions support an optional `alias`. Test multiple conditions in one condition statement. Passes if all embedded conditions are true. ```yaml -condition: +conditions: alias: "Paulus home AND temperature below 20" condition: and conditions: @@ -36,7 +36,7 @@ If you do not want to combine AND and OR conditions, you can list them sequentia The following configuration works the same as the one listed above: ```yaml -condition: +conditions: - condition: state entity_id: "device_tracker.paulus" state: "home" @@ -50,7 +50,7 @@ Currently you need to format your conditions like this to be able to edit them u The AND condition also has a shorthand form. The following configuration works the same as the ones listed above: ```yaml -condition: +conditions: alias: "Paulus home AND temperature below 20" and: - condition: state @@ -66,7 +66,7 @@ condition: Test multiple conditions in one condition statement. Passes if any embedded condition is true. ```yaml -condition: +conditions: alias: "Paulus home OR temperature below 20" condition: or conditions: @@ -81,7 +81,7 @@ condition: The OR condition also has a shorthand form. The following configuration works the same as the one listed above: ```yaml -condition: +conditions: alias: "Paulus home OR temperature below 20" or: - condition: state @@ -98,7 +98,7 @@ Test multiple AND and OR conditions in one condition statement. Passes if any em This allows you to mix several AND and OR conditions together. ```yaml -condition: +conditions: condition: and conditions: - condition: state @@ -117,7 +117,7 @@ condition: Or in shorthand form: ```yaml -condition: +conditions: and: - condition: state entity_id: "device_tracker.paulus" @@ -136,7 +136,7 @@ condition: Test multiple conditions in one condition statement. Passes if all embedded conditions are **not** true. ```yaml -condition: +conditions: alias: "Paulus not home AND alarm not disarmed" condition: not conditions: @@ -151,7 +151,7 @@ condition: The NOT condition also has a shorthand form. The following configuration works the same as the one listed above: ```yaml -condition: +conditions: alias: "Paulus not home AND alarm not disarmed" not: - condition: state @@ -169,7 +169,7 @@ This type of condition attempts to parse the state of the specified entity or th If both `below` and `above` are specified, both tests have to pass. ```yaml -condition: +conditions: alias: "Temperature between 17 and 25 degrees" condition: numeric_state entity_id: sensor.temperature @@ -182,7 +182,7 @@ You can optionally use a `value_template` to process the value of the state befo {% raw %} ```yaml -condition: +conditions: condition: numeric_state entity_id: sensor.temperature above: 17 @@ -197,7 +197,7 @@ It is also possible to test the condition against multiple entities at once. The condition will pass if **all** entities match the thresholds. ```yaml -condition: +conditions: condition: numeric_state entity_id: - sensor.kitchen_temperature @@ -209,7 +209,7 @@ Alternatively, the condition can test against a state attribute. The condition will pass if the attribute value of the entity matches the thresholds. ```yaml -condition: +conditions: condition: numeric_state entity_id: climate.living_room_thermostat attribute: temperature @@ -222,7 +222,7 @@ that contain a numeric value, can be used in the `above` and `below` options to make the condition more dynamic. ```yaml -condition: +conditions: condition: numeric_state entity_id: climate.living_room_thermostat attribute: temperature @@ -235,7 +235,7 @@ condition: Tests if an entity has a specified state. ```yaml -condition: +conditions: alias: "Paulus not home for an hour and a bit" condition: state entity_id: device_tracker.paulus @@ -251,7 +251,7 @@ It is also possible to test the condition against multiple entities at once. The condition will pass if **all** entities match the state. ```yaml -condition: +conditions: condition: state entity_id: - light.kitchen @@ -263,7 +263,7 @@ Instead of matching all, it is also possible if one of the entities matches. In the following example the condition will pass if **any** entity matches the state. ```yaml -condition: +conditions: condition: state entity_id: - binary_sensor.motion_sensor_left @@ -276,7 +276,7 @@ Testing if an entity is matching a set of possible conditions; The condition will pass if the entity matches one of the states given. ```yaml -condition: +conditions: condition: state entity_id: alarm_control_panel.home state: @@ -288,7 +288,7 @@ Or, combine multiple entities with multiple states. In the following example, both media players need to be either paused or playing for the condition to pass. ```yaml -condition: +conditions: condition: state entity_id: - media_player.living_room @@ -302,7 +302,7 @@ Alternatively, the condition can test against a state attribute. The condition will pass if the attribute matches the given state. ```yaml -condition: +conditions: condition: state entity_id: climate.living_room_thermostat attribute: fan_mode @@ -314,7 +314,7 @@ entities). The condition will pass if the state of the entity matches the state of the given helper entity. ```yaml -condition: +conditions: condition: state entity_id: alarm_control_panel.home state: input_select.guest_mode @@ -325,7 +325,7 @@ You can also use templates in the `for` option. {% raw %} ```yaml -condition: +conditions: condition: state entity_id: device_tracker.paulus state: "home" @@ -345,7 +345,7 @@ The `for` template(s) will be evaluated when the condition is tested. The sun state can be used to test if the sun has set or risen. ```yaml -condition: +conditions: alias: "Sun up" condition: state # 'day' condition: from sunrise until sunset entity_id: sun.sun @@ -353,7 +353,7 @@ condition: ``` ```yaml -condition: +conditions: alias: "Sun down" condition: state # from sunset until sunrise entity_id: sun.sun @@ -370,7 +370,7 @@ For an in-depth explanation of sun elevation, see [sun elevation trigger][sun_el {% raw %} ```yaml -condition: +conditions: condition: and # 'twilight' condition: dusk and dawn, in typical locations conditions: - condition: template @@ -384,7 +384,7 @@ condition: {% raw %} ```yaml -condition: +conditions: condition: template # 'night' condition: from dusk to dawn, in typical locations value_template: "{{ state_attr('sun.sun', 'elevation') < -6 }}" ``` @@ -405,7 +405,7 @@ The sunset/sunrise conditions do not work in locations inside the polar circles, This is an example of 1 hour offset before sunset: ```yaml -condition: +conditions: condition: sun after: sunset after_offset: "-01:00:00" @@ -414,7 +414,7 @@ condition: This is 'when dark' - equivalent to a state condition on `sun.sun` of `below_horizon`: ```yaml -condition: +conditions: - condition: sun after: sunset before: sunrise @@ -423,7 +423,7 @@ condition: This is 'when light' - equivalent to a state condition on `sun.sun` of `above_horizon`: ```yaml -condition: +conditions: - condition: sun after: sunrise before: sunset @@ -440,7 +440,7 @@ The template condition tests if the [given template][template] renders a value e {% raw %} ```yaml -condition: +conditions: alias: "Iphone battery above 50%" condition: template value_template: "{{ (state_attr('device_tracker.iphone', 'battery_level')|int) > 50 }}" @@ -487,7 +487,7 @@ and [`not`](#not-condition) conditions: {% raw %} ```yaml -condition: +conditions: condition: or conditions: - "{{ is_state('device_tracker.iphone', 'away') }}" @@ -539,7 +539,7 @@ It's also supported in script or automation `condition` actions: The time condition can test if it is after a specified time, before a specified time or if it is a certain day of the week. ```yaml -condition: +conditions: alias: "Time 15~02" condition: time # At least one of the following is required. @@ -565,7 +565,7 @@ or another `sensor` entity containing a timestamp with the "timestamp" device class, can be used instead. ```yaml -condition: +conditions: - alias: "Example referencing a time helper" condition: time after: input_datetime.house_silent_hours_start @@ -586,20 +586,20 @@ date part is fully ignored. The trigger condition can test if an automation was triggered by a certain trigger, identified by the trigger's `id`. ```yaml -condition: +conditions: condition: trigger id: event_trigger ``` For a trigger identified by its index, both a string and integer is allowed: ```yaml -condition: +conditions: condition: trigger id: "0" ``` ```yaml -condition: +conditions: condition: trigger id: 0 ``` @@ -607,7 +607,7 @@ condition: It is possible to give a list of triggers: ```yaml -condition: +conditions: condition: trigger id: - event_1_trigger @@ -619,7 +619,7 @@ condition: Zone conditions test if an entity is in a certain zone. For zone automation to work, you need to have set up a device tracker platform that supports reporting GPS coordinates. ```yaml -condition: +conditions: alias: "Paulus at home" condition: zone entity_id: device_tracker.paulus @@ -630,7 +630,7 @@ It is also possible to test the condition against multiple entities at once. The condition will pass if all entities are in the specified zone. ```yaml -condition: +conditions: condition: zone entity_id: - device_tracker.frenck @@ -642,7 +642,7 @@ Testing if an entity is matching a set of possible zones; The condition will pass if the entity is in one of the zones. ```yaml -condition: +conditions: condition: zone entity_id: device_tracker.paulus state: @@ -655,7 +655,7 @@ both entities need to be either in the home or the work zone for the condition to pass. ```yaml -condition: +conditions: condition: zone entity_id: - device_tracker.frenck @@ -670,7 +670,7 @@ condition: {% raw %} ```yaml -condition: +conditions: - condition: numeric_state entity_id: sun.sun value_template: "{{ state.attributes.elevation }}" @@ -700,7 +700,7 @@ For example: ```yaml # This condition will always pass, as it is disabled. -condition: +conditions: enabled: false condition: state entity_id: sun.sun @@ -728,7 +728,7 @@ blueprint: trigger_variables: _enable_number: !input input_number - condition: + conditions: - condition: state entity_id: sun.sun state: "above_horizon" diff --git a/source/_docs/tools/dev-tools.markdown b/source/_docs/tools/dev-tools.markdown index d4354848519..3cf3fc39e1c 100644 --- a/source/_docs/tools/dev-tools.markdown +++ b/source/_docs/tools/dev-tools.markdown @@ -104,10 +104,10 @@ If there is an automation that handles that event, it will be automatically trig ```yaml - alias: "Capture Event" - trigger: + triggers: platform: event event_type: event_light_state_changed - action: + actions: - action: notify.notify data: message: "Light is turned {{ trigger.event.data.state }}" diff --git a/source/_integrations/alert.markdown b/source/_integrations/alert.markdown index 236933574d7..7e1933d9d53 100644 --- a/source/_integrations/alert.markdown +++ b/source/_integrations/alert.markdown @@ -285,12 +285,12 @@ but you will still receive the done message. ```yaml - alias: "Telegram callback to stop alerts for garage door" - trigger: + triggers: - platform: event event_type: telegram_callback event_data: data: "/garage_acknowledge" - action: + actions: - action: alert.turn_off target: entity_id: alert.garage_door diff --git a/source/_integrations/amcrest.markdown b/source/_integrations/amcrest.markdown index 3a729edae66..a916b23f0b9 100644 --- a/source/_integrations/amcrest.markdown +++ b/source/_integrations/amcrest.markdown @@ -436,14 +436,14 @@ Using this {% term trigger %} in an {% term automation %} will allow you to dete # Example automations.yaml entry alias: Doorbell Pressed description: "Trigger when Amcrest Button Press Event Fires" -trigger: +triggers: - platform: event event_type: amcrest event_data: event: "CallNoAnswered" payload: action: "Start" -action: +actions: - type: flash entity_id: light.living_room domain: light diff --git a/source/_integrations/androidtv.markdown b/source/_integrations/androidtv.markdown index 8f1ba56ac34..d4f5d13b805 100644 --- a/source/_integrations/androidtv.markdown +++ b/source/_integrations/androidtv.markdown @@ -146,7 +146,7 @@ The `androidtv.adb_command` action allows you to send either keys or ADB shell c In an [action](/getting-started/automation-action/) of your [automation setup](/getting-started/automation/) it could look like this: ```yaml -action: +actions: action: androidtv.adb_command target: entity_id: media_player.androidtv_tv_living_room diff --git a/source/_integrations/august.markdown b/source/_integrations/august.markdown index 68e33ed0f1c..2a43d7edc9e 100644 --- a/source/_integrations/august.markdown +++ b/source/_integrations/august.markdown @@ -147,14 +147,14 @@ Using the lock operation sensors, you can detect when a user operates a lock and - id: "1583706446906" alias: "joe_doe_front_door_operate" description: John Doe locks or unlocks the Front Door - trigger: + triggers: - entity_id: sensor.front_door_operator platform: state to: John Doe - condition: + conditions: - condition: template value_template: "{{ not state_attr('sensor.front_door_operator', 'remote') }}" - action: + actions: - data: {} entity_id: camera.inside action: camera.turn_off diff --git a/source/_integrations/azure_service_bus.markdown b/source/_integrations/azure_service_bus.markdown index 2de31c694bd..49a83778098 100644 --- a/source/_integrations/azure_service_bus.markdown +++ b/source/_integrations/azure_service_bus.markdown @@ -81,10 +81,10 @@ See the example below for how an automation trigger translates to a message on t ```yaml automation: - alias: "Sunset Service Bus message" - trigger: + triggers: platform: sun event: sunset - action: + actions: action: notify.test_queue data: message: "Sun is going down" diff --git a/source/_integrations/backup.markdown b/source/_integrations/backup.markdown index eddde8a6e0d..0538cbf42b4 100644 --- a/source/_integrations/backup.markdown +++ b/source/_integrations/backup.markdown @@ -51,10 +51,10 @@ at 3 AM: ```yaml automation: - alias: "Backup Home Assistant every night at 3 AM" - trigger: + triggers: platform: time at: "03:00:00" - action: + actions: alias: "Create backup now" action: backup.create ``` diff --git a/source/_integrations/binary_sensor.xiaomi_aqara.markdown b/source/_integrations/binary_sensor.xiaomi_aqara.markdown index fa76c4353de..3072351aee0 100644 --- a/source/_integrations/binary_sensor.xiaomi_aqara.markdown +++ b/source/_integrations/binary_sensor.xiaomi_aqara.markdown @@ -39,16 +39,16 @@ The requirement is that you have setup the [`xiaomi aqara` integration](/integra ```yaml - alias: "If there is motion and it's dark turn on the gateway light" - trigger: + triggers: platform: state entity_id: binary_sensor.motion_sensor_158d000xxxxxc2 from: "off" to: "on" - condition: + conditions: condition: numeric_state entity_id: sensor.illumination_34ce00xxxx11 below: 300 - action: + actions: - action: light.turn_on target: entity_id: light.gateway_light_34ce00xxxx11 @@ -58,14 +58,14 @@ The requirement is that you have setup the [`xiaomi aqara` integration](/integra target: entity_id: automation.MOTION_OFF - alias: "If there no motion for 5 minutes turn off the gateway light" - trigger: + triggers: platform: state entity_id: binary_sensor.motion_sensor_158d000xxxxxc2 from: "on" to: "off" for: minutes: 5 - action: + actions: - action: light.turn_off target: entity_id: light.gateway_light_34ce00xxxx11 @@ -78,42 +78,42 @@ The requirement is that you have setup the [`xiaomi aqara` integration](/integra ```yaml - alias: "If the window is open turn off the radiator" - trigger: + triggers: platform: state entity_id: binary_sensor.door_window_sensor_158d000xxxxxc2 from: "off" to: "on" - action: + actions: action: climate.set_operation_mode target: entity_id: climate.livingroom data: operation_mode: "Off" - alias: "If the window is closed for 5 minutes turn on the radiator again" - trigger: + triggers: platform: state entity_id: binary_sensor.door_window_sensor_158d000xxxxxc2 from: "on" to: "off" for: minutes: 5 - action: + actions: action: climate.set_operation_mode target: entity_id: climate.livingroom data: operation_mode: "Smart schedule" - alias: "Notify if door is opened when away" - trigger: + triggers: platform: state entity_id: binary_sensor.door_window_sensor_15xxxxxxc9xx6b from: "off" to: "on" - condition: + conditions: - condition: state entity_id: group.family state: "not_home" - action: + actions: - action: notify.notify_person data: message: "The door has been opened" @@ -123,12 +123,12 @@ The requirement is that you have setup the [`xiaomi aqara` integration](/integra ```yaml - alias: "Send notification on fire alarm" - trigger: + triggers: platform: state entity_id: binary_sensor.smoke_sensor_158d0001574899 from: "off" to: "on" - action: + actions: - action: notify.html5 data: title: Fire alarm! @@ -146,12 +146,12 @@ The requirement is that you have setup the [`xiaomi aqara` integration](/integra ```yaml - alias: "Send notification on gas alarm" - trigger: + triggers: platform: state entity_id: binary_sensor.natgas_sensor_158dxxxxxxxxxx from: "off" to: "on" - action: + actions: - action: notify.html5 data: title: Gas alarm! @@ -166,35 +166,35 @@ As indicated in the table on top of this page there are 3 versions of the button ```yaml - alias: "Toggle dining light on single press" - trigger: + triggers: platform: event event_type: xiaomi_aqara.click event_data: entity_id: binary_sensor.switch_158d000xxxxxc2 click_type: single - action: + actions: action: switch.toggle target: entity_id: switch.wall_switch_left_158d000xxxxx01 - alias: "Toggle couch light on double click" - trigger: + triggers: platform: event event_type: xiaomi_aqara.click event_data: entity_id: binary_sensor.switch_158d000xxxxxc2 click_type: double - action: + actions: action: switch.toggle target: entity_id: switch.wall_switch_right_158d000xxxxx01 - alias: "Let a dog bark on long press" - trigger: + triggers: platform: event event_type: xiaomi_aqara.click event_data: entity_id: binary_sensor.switch_158d000xxxxxc2 click_type: long_click_press - action: + actions: action: xiaomi_aqara.play_ringtone data: gw_mac: xxxxxxxxxxxx @@ -208,65 +208,65 @@ Available events are `flip90`, `flip180`, `move`, `tap_twice`, `shake_air`, `swi ```yaml - alias: "Cube event flip90" - trigger: + triggers: platform: event event_type: xiaomi_aqara.cube_action event_data: entity_id: binary_sensor.cube_15xxxxxxxxxxxx action_type: flip90 - action: + actions: - action: light.turn_on target: entity_id: light.gateway_light_28xxxxxxxxxx data: color_name: "springgreen" - alias: "Cube event flip180" - trigger: + triggers: platform: event event_type: xiaomi_aqara.cube_action event_data: entity_id: binary_sensor.cube_15xxxxxxxxxxxx action_type: flip180 - action: + actions: - action: light.turn_on target: entity_id: light.gateway_light_28xxxxxxxxxx data: color_name: "darkviolet" - alias: "Cube event move" - trigger: + triggers: platform: event event_type: xiaomi_aqara.cube_action event_data: entity_id: binary_sensor.cube_15xxxxxxxxxxxx action_type: move - action: + actions: - action: light.turn_on target: entity_id: light.gateway_light_28xxxxxxxxxx data: color_name: "gold" - alias: "Cube event tap_twice" - trigger: + triggers: platform: event event_type: xiaomi_aqara.cube_action event_data: entity_id: binary_sensor.cube_15xxxxxxxxxxxx action_type: tap_twice - action: + actions: - action: light.turn_on target: entity_id: light.gateway_light_28xxxxxxxxxx data: color_name: "deepskyblue" - alias: "Cube event shake_air" - trigger: + triggers: platform: event event_type: xiaomi_aqara.cube_action event_data: entity_id: binary_sensor.cube_15xxxxxxxxxxxx action_type: shake_air - action: + actions: - action: light.turn_on target: entity_id: light.gateway_light_28xxxxxxxxxx @@ -282,13 +282,13 @@ The Aqara Wireless Switch is available as single-key and double-key version. Eac ```yaml - alias: "Decrease brightness of the gateway light" - trigger: + triggers: platform: event event_type: xiaomi_aqara.click event_data: entity_id: binary_sensor.wall_switch_left_158xxxxxxxxx12 click_type: single - action: + actions: action: light.turn_on target: entity_id: light.gateway_light_34xxxxxxxx13 @@ -305,13 +305,13 @@ The Aqara Wireless Switch is available as single-key and double-key version. Eac {% endif %} - alias: "Increase brightness of the gateway light" - trigger: + triggers: platform: event event_type: xiaomi_aqara.click event_data: entity_id: binary_sensor.wall_switch_right_158xxxxxxxxx12 click_type: single - action: + actions: action: light.turn_on target: entity_id: light.gateway_light_34xxxxxxxx13 @@ -328,13 +328,13 @@ The Aqara Wireless Switch is available as single-key and double-key version. Eac {% endif %} - alias: "Turn off the gateway light" - trigger: + triggers: platform: event event_type: xiaomi_aqara.click event_data: entity_id: binary_sensor.wall_switch_both_158xxxxxxxxx12 click_type: both - action: + actions: action: light.turn_off target: entity_id: light.gateway_light_34xxxxxxxx13 @@ -348,24 +348,24 @@ This automation toggles the living room lamp on vibration/tilt. ```yaml - alias: "Turn on Living Room Lamp on vibration" - trigger: + triggers: platform: event event_type: xiaomi_aqara.movement event_data: entity_id: binary_sensor.vibration_xxxx000000 movement_type: vibrate - action: + actions: action: light.toggle target: entity_id: light.living_room_lamp - alias: "Turn on Living Room Lamp on tilt" - trigger: + triggers: platform: event event_type: xiaomi_aqara.movement event_data: entity_id: binary_sensor.vibration_xxxx000000 movement_type: tilt - action: + actions: action: light.toggle target: entity_id: light.living_room_lamp diff --git a/source/_integrations/blink.markdown b/source/_integrations/blink.markdown index e8168832005..cad4742a6aa 100644 --- a/source/_integrations/blink.markdown +++ b/source/_integrations/blink.markdown @@ -135,11 +135,11 @@ Here, this example assumes your blink module is named `My Sync Module` and that ```yaml - id: arm_blink_when_away alias: "Arm Blink When Away" - trigger: + triggers: platform: state entity_id: all to: "not_home" - action: + actions: action: alarm_control_panel.alarm_arm_away target: entity_id: alarm_control_panel.blink_my_sync_module @@ -152,11 +152,11 @@ Similar to the previous example, this automation will disarm blink when arriving ```yaml - id: disarm_blink_when_home alias: "Disarm Blink When Home" - trigger: + triggers: platform: state entity_id: all to: "home" - action: + actions: action: alarm_control_panel.alarm_disarm target: entity_id: alarm_control_panel.blink_my_sync_module @@ -173,11 +173,11 @@ The following example assumes your camera's name (in the Blink app) is `My Camer ```yaml - id: save_blink_video_on_motion alias: "Save Blink Video on Motion" - trigger: + triggers: platform: state entity_id: binary_sensor.blink_my_camera_motion_detected to: "on" - action: + actions: - action: blink.save_video target: entity_id: camera.blink_my_camera @@ -202,10 +202,10 @@ The file name of the downloaded video file is not configurable. ```yaml - id: save_recent_clips_from_my_camera alias: "Save Recent Clips from My Camera" - trigger: + triggers: - platform: time_pattern minutes: /3 - action: + actions: - action: blink.save_recent_clips target: entity_id: camera.my_camera diff --git a/source/_integrations/bmw_connected_drive.markdown b/source/_integrations/bmw_connected_drive.markdown index d78b5afca3c..3230943f4ee 100644 --- a/source/_integrations/bmw_connected_drive.markdown +++ b/source/_integrations/bmw_connected_drive.markdown @@ -79,7 +79,7 @@ The name of the action is `notify.bmw_connected_drive_`. ```yaml ... -action: +actions: action: notify.bmw_connected_drive_ data: message: The name of the POI # this is shown on the iDrive dashboard diff --git a/source/_integrations/bring.markdown b/source/_integrations/bring.markdown index 4e7487d3190..4e3f51ffe05 100644 --- a/source/_integrations/bring.markdown +++ b/source/_integrations/bring.markdown @@ -57,7 +57,7 @@ The **Bring** integration offers an action to send push notifications to the Bri ```yaml ... -action: +actions: action: bring.send_message target: entity_id: todo.bring_shoppinglist @@ -71,7 +71,7 @@ Note that for the notification type `urgent_message` the attribute `item` is **r ```yaml ... -action: +actions: action: bring.send_message target: entity_id: todo.bring_shoppinglist diff --git a/source/_integrations/button.markdown b/source/_integrations/button.markdown index 460ed210238..ac33027fc84 100644 --- a/source/_integrations/button.markdown +++ b/source/_integrations/button.markdown @@ -45,10 +45,10 @@ Because the {% term state %} of a button entity in Home Assistant is a timestamp means we can use it in our automations. For example: ```yaml -trigger: +triggers: - platform: state entity_id: button.my_button -action: +actions: - action: notify.frenck data: message: "My button has been pressed!" diff --git a/source/_integrations/calendar.markdown b/source/_integrations/calendar.markdown index 0956559d32f..0116463f572 100644 --- a/source/_integrations/calendar.markdown +++ b/source/_integrations/calendar.markdown @@ -63,7 +63,7 @@ An example of a calendar {% term trigger %} in YAML: ```yaml automation: - - trigger: + - triggers: - platform: calendar # Possible values: start, end event: start @@ -99,11 +99,11 @@ This example automation consists of: ```yaml automation: - alias: Calendar notification - trigger: + triggers: - platform: calendar event: start entity_id: calendar.personal - action: + actions: - action: persistent_notification.create data: message: >- @@ -126,17 +126,17 @@ This example consists of: ```yaml automation: - alias: Front Light Schedule - trigger: + triggers: - platform: calendar event: start entity_id: calendar.device_automation - platform: calendar event: end entity_id: calendar.device_automation - condition: + conditions: - condition: template value_template: "{{ 'Front Lights' in trigger.calendar_event.summary }}" - action: + actions: - if: - "{{ trigger.event == 'start' }}" then: diff --git a/source/_integrations/camera.markdown b/source/_integrations/camera.markdown index 55c136754d4..2252d9a4312 100644 --- a/source/_integrations/camera.markdown +++ b/source/_integrations/camera.markdown @@ -74,7 +74,7 @@ Play a live stream from a camera to selected media player(s). Requires [`stream` For example, the following action in an automation would send an `hls` live stream to your chromecast. ```yaml -action: +actions: action: camera.play_stream target: entity_id: camera.yourcamera @@ -102,7 +102,7 @@ For example, the following action in an automation would take a recording from " {% raw %} ```yaml -action: +actions: action: camera.record target: entity_id: camera.yourcamera @@ -128,7 +128,7 @@ For example, the following action in an automation would take a snapshot from "y {% raw %} ```yaml -action: +actions: action: camera.snapshot target: entity_id: camera.yourcamera diff --git a/source/_integrations/cisco_webex_teams.markdown b/source/_integrations/cisco_webex_teams.markdown index 1c7b5301ebd..48e5e98dc27 100644 --- a/source/_integrations/cisco_webex_teams.markdown +++ b/source/_integrations/cisco_webex_teams.markdown @@ -65,10 +65,10 @@ Here are the automations for the above screenshot: # Rich Text Example 1. # Show a one line message with a red banner - alias: "Notify On Build Failing" - trigger: + triggers: - platform: webhook webhook_id: build_failed - action: + actions: action: notify.cisco_webex_teams_notify data: message: "
Build 0.89.5 compile failed." @@ -78,10 +78,10 @@ Here are the automations for the above screenshot: # Show a title and multi-line message with a yellow banner, # with lists, a person mention and a link - alias: "Notify On Build Unstable" - trigger: + triggers: - platform: webhook webhook_id: build_unstable - action: + actions: action: notify.cisco_webex_teams_notify data: title: "Build 0.89.6 is unstable." @@ -101,10 +101,10 @@ Here are the automations for the above screenshot: # Show a title and multi-line message with a blue banner, # with lists, a person mention and a link - alias: "Notify On Build Passing" - trigger: + triggers: - platform: webhook webhook_id: build_passed - action: + actions: action: notify.cisco_webex_teams_notify data: title: "✅ Version 0.89.7 passed all tests and deployed to production!" diff --git a/source/_integrations/clicksend_tts.markdown b/source/_integrations/clicksend_tts.markdown index baac22ad4f6..7d779411fd5 100644 --- a/source/_integrations/clicksend_tts.markdown +++ b/source/_integrations/clicksend_tts.markdown @@ -61,10 +61,10 @@ ClickSend is a notify platform and thus can be controlled by calling the notify ```yaml alias: "The sun has set" -trigger: +triggers: - platform: sun event: sunset -action: +actions: - action: notify.clicksend_tts data: message: "The sun has set" diff --git a/source/_integrations/climate.markdown b/source/_integrations/climate.markdown index 4867622b004..94fa3e05595 100644 --- a/source/_integrations/climate.markdown +++ b/source/_integrations/climate.markdown @@ -52,10 +52,10 @@ Turn auxiliary heater on/off for climate device ```yaml automation: - trigger: + triggers: platform: time at: "07:15:00" - action: + actions: - action: climate.set_aux_heat target: entity_id: climate.kitchen @@ -78,10 +78,10 @@ reflecting a situation where the climate device is set to save energy. For examp ```yaml automation: - trigger: + triggers: platform: time at: "07:15:00" - action: + actions: - action: climate.set_preset_mode target: entity_id: climate.kitchen @@ -106,10 +106,10 @@ Set target temperature of climate device ```yaml ### Set temperature to 24 in heat mode automation: - trigger: + triggers: platform: time at: "07:15:00" - action: + actions: - action: climate.set_temperature target: entity_id: climate.kitchen @@ -121,10 +121,10 @@ automation: ```yaml ### Set temperature range to 20 to 24 in heat_cool mode automation: - trigger: + triggers: platform: time at: "07:15:00" - action: + actions: - action: climate.set_temperature target: entity_id: climate.kitchen @@ -147,10 +147,10 @@ Set target humidity of climate device ```yaml automation: - trigger: + triggers: platform: time at: "07:15:00" - action: + actions: - action: climate.set_humidity target: entity_id: climate.kitchen @@ -171,10 +171,10 @@ Set fan operation for climate device ```yaml automation: - trigger: + triggers: platform: time at: "07:15:00" - action: + actions: - action: climate.set_fan_mode target: entity_id: climate.kitchen @@ -195,10 +195,10 @@ Set climate device's HVAC mode ```yaml automation: - trigger: + triggers: platform: time at: "07:15:00" - action: + actions: - action: climate.set_hvac_mode target: entity_id: climate.kitchen @@ -219,10 +219,10 @@ Set swing operation mode for climate device ```yaml automation: - trigger: + triggers: platform: time at: "07:15:00" - action: + actions: - action: climate.set_swing_mode target: entity_id: climate.kitchen diff --git a/source/_integrations/color_extractor.markdown b/source/_integrations/color_extractor.markdown index 8460369aef4..9582d357a42 100644 --- a/source/_integrations/color_extractor.markdown +++ b/source/_integrations/color_extractor.markdown @@ -54,11 +54,11 @@ Example usage in an {% term automation %}, taking the album art present on a Chr #automation.yaml - alias: "Chromecast to Shelf Lights" - trigger: + triggers: - platform: state entity_id: media_player.chromecast - action: + actions: - action: color_extractor.turn_on data_template: color_extract_url: "{{ states.media_player.chromecast.attributes.entity_picture }}" @@ -71,11 +71,11 @@ With a nicer transition period of 5 seconds and setting brightness to 100% each #automation.yaml - alias: "Nicer Chromecast to Shelf Lights" - trigger: + triggers: - platform: state entity_id: media_player.chromecast - action: + actions: - action: color_extractor.turn_on data_template: color_extract_url: "{{ states.media_player.chromecast.attributes.entity_picture }}" diff --git a/source/_integrations/counter.markdown b/source/_integrations/counter.markdown index 3a819288d9b..3384d1ba4b7 100644 --- a/source/_integrations/counter.markdown +++ b/source/_integrations/counter.markdown @@ -149,12 +149,12 @@ system_log: automation: - id: 'errorcounterautomation' alias: "Error Counting Automation" - trigger: + triggers: platform: event event_type: system_log_event event_data: level: ERROR - action: + actions: action: counter.increment target: entity_id: counter.error_counter diff --git a/source/_integrations/cover.markdown b/source/_integrations/cover.markdown index ba051bb67ce..74b65e6d3dd 100644 --- a/source/_integrations/cover.markdown +++ b/source/_integrations/cover.markdown @@ -75,10 +75,10 @@ Available actions: `cover.open_cover`, `cover.close_cover`, `cover.stop_cover`, ```yaml automation: - trigger: + triggers: platform: time at: "07:15:00" - action: + actions: - action: cover.open_cover target: entity_id: cover.demo @@ -97,10 +97,10 @@ Set cover position of one or multiple covers. ```yaml automation: - trigger: + triggers: platform: time at: "07:15:00" - action: + actions: - action: cover.set_cover_position target: entity_id: cover.demo @@ -121,10 +121,10 @@ Set cover tilt position of one or multiple covers. ```yaml automation: - trigger: + triggers: platform: time at: "07:15:00" - action: + actions: - action: cover.set_cover_tilt_position target: entity_id: cover.demo diff --git a/source/_integrations/cover.template.markdown b/source/_integrations/cover.template.markdown index f39088e13b8..63872507bab 100644 --- a/source/_integrations/cover.template.markdown +++ b/source/_integrations/cover.template.markdown @@ -291,11 +291,11 @@ script: automation: - alias: "Close covers at night" - trigger: + triggers: - platform: sun event: sunset offset: "+00:30:00" - action: + actions: - action: cover.set_cover_position target: entity_id: cover.cover_group diff --git a/source/_integrations/deconz.markdown b/source/_integrations/deconz.markdown index a40eb61f9be..76cb019bf18 100644 --- a/source/_integrations/deconz.markdown +++ b/source/_integrations/deconz.markdown @@ -194,26 +194,26 @@ If you have a Zigbee remote that is not yet supported you can request support fo automation: - alias: "'Toggle lamp from dimmer'" initial_state: "on" - trigger: + triggers: - platform: event event_type: deconz_event event_data: id: remote_control_1 event: 1002 - action: + actions: - action: light.toggle target: entity_id: light.lamp - alias: "Increase brightness of lamp from dimmer" initial_state: "on" - trigger: + triggers: - platform: event event_type: deconz_event event_data: id: remote_control_1 event: 2002 - action: + actions: - action: light.turn_on target: entity_id: light.lamp @@ -224,13 +224,13 @@ automation: - alias: "Decrease brightness of lamp from dimmer" initial_state: "on" - trigger: + triggers: - platform: event event_type: deconz_event event_data: id: remote_control_1 event: 3002 - action: + actions: - action: light.turn_on target: entity_id: light.lamp @@ -241,13 +241,13 @@ automation: - alias: 'Turn lamp on when turning cube clockwise' initial_state: "on" - trigger: + triggers: - platform: event event_type: deconz_event event_data: id: remote_control_1 gesture: 7 - action: + actions: - action: light.turn_on target: entity_id: light.lamp @@ -262,13 +262,13 @@ automation: ```yaml automation: - alias: "React to color wheel changes" - trigger: + triggers: - platform: event event_type: deconz_event event_data: id: tint_remote_1 event: 6002 - action: + actions: - action: light.turn_on data: xy_color: @@ -288,11 +288,11 @@ Note: Requires `on: true` to change color while the Philips Hue bulb is off. If automation: - alias: "Flash Hue Bulb with Doorbell Motion" mode: single - trigger: + triggers: - platform: state entity_id: binary_sensor.doorbell_motion to: "on" - action: + actions: - action: deconz.configure data: entity: light.hue_lamp diff --git a/source/_integrations/device_automation.markdown b/source/_integrations/device_automation.markdown index 03264ab4032..244d60476bd 100644 --- a/source/_integrations/device_automation.markdown +++ b/source/_integrations/device_automation.markdown @@ -22,12 +22,12 @@ Example: ```yaml - id: "123456789" alias: "Light turns off" - trigger: + triggers: - platform: device device_id: 7a92d5ee74014a0b86903fc669b0bcd6 domain: light type: turn_off entity_id: light.bowl - action: + actions: - action: camera.turn_off ``` diff --git a/source/_integrations/dexcom.markdown b/source/_integrations/dexcom.markdown index 33238cc7ff1..cff278431cf 100644 --- a/source/_integrations/dexcom.markdown +++ b/source/_integrations/dexcom.markdown @@ -47,14 +47,14 @@ If you have a sensor session running, and once you have enabled the Dexcom integ - id: '1234567890123' alias: "overnight_low_kitchen_lights" description: Turn on the lights in the kitchen if my blood sugar drops low overnight - trigger: + triggers: - below: '65' entity_id: sensor.dexcom_YOUR_USERNAME_glucose_value platform: numeric_state condition: time after: "22:00:00" before: "06:00:00" - action: + actions: - action: light.turn_on target: entity_id: light.kitchen diff --git a/source/_integrations/dialogflow.markdown b/source/_integrations/dialogflow.markdown index 72b27600714..c210706199f 100644 --- a/source/_integrations/dialogflow.markdown +++ b/source/_integrations/dialogflow.markdown @@ -108,7 +108,7 @@ intent_script: TurnLights: speech: text: Turning {{ Room }} lights {{ OnOff }} - action: + actions: - action: notify.pushbullet data: message: Someone asked via apiai to turn {{ Room }} lights {{ OnOff }} diff --git a/source/_integrations/doods.markdown b/source/_integrations/doods.markdown index 51bae78c2b2..c5dda2d6b64 100644 --- a/source/_integrations/doods.markdown +++ b/source/_integrations/doods.markdown @@ -215,11 +215,11 @@ image_processing: ```yaml # Example advanced automations.yaml entry - alias: "Doods scanning" - trigger: + triggers: - platform: state entity_id: - binary_sensor.driveway - action: + actions: - action: image_processing.scan target: entity_id: image_processing.doods_camera_driveway diff --git a/source/_integrations/doorbird.markdown b/source/_integrations/doorbird.markdown index 52de7a2ce32..faf707c746c 100644 --- a/source/_integrations/doorbird.markdown +++ b/source/_integrations/doorbird.markdown @@ -104,10 +104,10 @@ The example automation below shows how to turn on a light when somebody presses ```yaml - alias: "Doorbird Ring" - trigger: + triggers: platform: event event_type: doorbird_driveway_gate_somebody_pressed_the_button - action: + actions: action: light.turn_on target: entity_id: light.side_entry_porch diff --git a/source/_integrations/dovado.markdown b/source/_integrations/dovado.markdown index 25e6c7eadef..2e97dd874b9 100644 --- a/source/_integrations/dovado.markdown +++ b/source/_integrations/dovado.markdown @@ -76,10 +76,10 @@ This is a notify platform and thus can be controlled by calling the notify actio # Example automation notification entry automation: - alias: "The sun has set" - trigger: + triggers: platform: sun event: sunset - action: + actions: action: notify.dovado data: message: "The sun has set" diff --git a/source/_integrations/downloader.markdown b/source/_integrations/downloader.markdown index 87eb8328ad4..a6e154ca388 100644 --- a/source/_integrations/downloader.markdown +++ b/source/_integrations/downloader.markdown @@ -51,10 +51,10 @@ Along with the event the following payload parameters are available: ```yaml - alias: "Download Failed Notification" - trigger: + triggers: platform: event event_type: downloader_download_failed - action: + actions: action: persistent_notification.create data: message: "{{trigger.event.data.filename}} download failed" diff --git a/source/_integrations/easyenergy.markdown b/source/_integrations/easyenergy.markdown index 432aeb0e19b..2b06936f943 100644 --- a/source/_integrations/easyenergy.markdown +++ b/source/_integrations/easyenergy.markdown @@ -167,10 +167,10 @@ You can use the response data in a template sensor that is updated every hour: ```yaml template: - - trigger: + - triggers: - platform: time_pattern seconds: "*" - action: + actions: - action: easyenergy.get_energy_usage_prices response_variable: response data: diff --git a/source/_integrations/elgato.markdown b/source/_integrations/elgato.markdown index 31cdeb7c84e..26b74c64dea 100644 --- a/source/_integrations/elgato.markdown +++ b/source/_integrations/elgato.markdown @@ -82,11 +82,11 @@ a binary sensor (a doorbell) is triggered: ```yaml - alias: Visual doorbell notification example - trigger: + triggers: - platform: state entity_id: binary_sensor.doorbell to: "on" - action: + actions: - action: elgato.identify target: entity_id: light.elgato_key_light diff --git a/source/_integrations/emulated_roku.markdown b/source/_integrations/emulated_roku.markdown index 5d4de089809..5fbb3421480 100644 --- a/source/_integrations/emulated_roku.markdown +++ b/source/_integrations/emulated_roku.markdown @@ -116,14 +116,14 @@ The following is an example implementation of an automation: # Example automation - id: amp_volume_up alias: "Increase amplifier volume" - trigger: + triggers: - platform: event event_type: roku_command event_data: source_name: Home Assistant type: keypress key: Fwd - action: + actions: - action: media_player.volume_up target: entity_id: media_player.amplifier diff --git a/source/_integrations/energyzero.markdown b/source/_integrations/energyzero.markdown index 2d6d42c3317..2818ed3657f 100644 --- a/source/_integrations/energyzero.markdown +++ b/source/_integrations/energyzero.markdown @@ -136,10 +136,10 @@ The response data can be added to a template sensor: ```yaml template: - - trigger: + - triggers: - platform: time_pattern hours: "*" - action: + actions: - action: energyzero.get_energy_prices response_variable: prices data: diff --git a/source/_integrations/enocean.markdown b/source/_integrations/enocean.markdown index 602b2a33e08..79e1a8f4df2 100644 --- a/source/_integrations/enocean.markdown +++ b/source/_integrations/enocean.markdown @@ -111,13 +111,13 @@ Sample automation to switch lights on and off: # Example automation to turn lights on/off on button release automation: - alias: "Hall light switches" - trigger: + triggers: platform: event event_type: button_pressed event_data: id: [0xYY, 0xYY, 0xYY, 0xYY] pushed: 0 - action: + actions: action: "{% if trigger.event.data.onoff %} light.turn_on {% else %} light.turn_off {%endif %}" target: entity_id: "{% if trigger.event.data.which == 1 %} light.hall_left {% else %} light.hall_right {%endif %}" diff --git a/source/_integrations/event.markdown b/source/_integrations/event.markdown index b0bcb54b9c9..3543acce9a3 100644 --- a/source/_integrations/event.markdown +++ b/source/_integrations/event.markdown @@ -45,10 +45,10 @@ In addition, the entity can have the following states: Because the state of an event entity in Home Assistant is a timestamp, it means we can use it in our automations. For example: ```yaml -trigger: +triggers: - platform: state entity_id: event.doorbell -action: +actions: - action: notify.frenck data: message: "Ding Dong! Someone is at the door!" @@ -63,10 +63,10 @@ This allows you, for example, to trigger a different action when the button on a When combining that with the [choose action](/docs/scripts/#choose-a-group-of-actions) script, you can assign multiple different actions to a single event entity. In the following example, short- or long-pressing the button on the remote will trigger a different scene: ```yaml -trigger: +triggers: - platform: state entity_id: event.hue_remote_control -action: +actions: - alias: "Choose an action based on the type of event" choose: - conditions: diff --git a/source/_integrations/evohome.markdown b/source/_integrations/evohome.markdown index ae3b93c19e0..b60952716d6 100644 --- a/source/_integrations/evohome.markdown +++ b/source/_integrations/evohome.markdown @@ -129,7 +129,7 @@ This action call will set the operating `mode` of the system for a specified per For **AutoWithEco**, the period of time is a `duration` is up to 24 hours. ```yaml -- action: +- actions: - action: evohome.set_system_mode data: mode: AutoWithEco @@ -139,7 +139,7 @@ For **AutoWithEco**, the period of time is a `duration` is up to 24 hours. For the other modes, such as **Away**, the duration is a `period` of days, where 1 day will revert at midnight tonight, and 2 days reverts at midnight tomorrow. ```yaml -- action: +- actions: - action: evohome.set_system_mode data: mode: Away @@ -161,7 +161,7 @@ This action will immediately pull the latest state data from the vendor's server This action will set the `setpoint` of a zone, as identified by its `entity_id`, for a specified period of time (**TemporaryOverride**). However, if no period of time is provided (c.f. a duration of 0, below), then the change is permanent (**PermanentOverride**). ```yaml -- action: +- actions: - action: evohome.set_zone_override target: entity_id: climate.loungeroom @@ -172,7 +172,7 @@ This action will set the `setpoint` of a zone, as identified by its `entity_id`, The `duration` can be up to 24 hours, after which the zone mode will revert to schedule (**FollowSchedule**). If the `duration` is 0 hours, then the change will be until the next setpoint. ```yaml -- action: +- actions: - action: evohome.set_zone_override target: entity_id: climate.loungeroom diff --git a/source/_integrations/facebook.markdown b/source/_integrations/facebook.markdown index a17d6603044..971d750db04 100644 --- a/source/_integrations/facebook.markdown +++ b/source/_integrations/facebook.markdown @@ -48,10 +48,10 @@ The phone number used in **target** should be registered with Facebook messenger # Example automation notification entry automation: - alias: "Evening Greeting" - trigger: + triggers: platform: sun event: sunset - action: + actions: action: notify.facebook data: message: "Good Evening" diff --git a/source/_integrations/fan.markdown b/source/_integrations/fan.markdown index 8841f6a2a51..a2bb67b516a 100644 --- a/source/_integrations/fan.markdown +++ b/source/_integrations/fan.markdown @@ -50,10 +50,10 @@ Sets the speed percentage for fan device. ```yaml automation: - trigger: + triggers: platform: time at: "07:15:00" - action: + actions: - action: fan.set_percentage target: entity_id: fan.kitchen @@ -74,10 +74,10 @@ Sets a preset mode for the fan device. Available preset modes are defined by the ```yaml automation: - trigger: + triggers: platform: time at: "07:15:00" - action: + actions: - action: fan.set_preset_mode target: entity_id: fan.kitchen @@ -98,10 +98,10 @@ Sets the rotation for fan device. ```yaml automation: - trigger: + triggers: platform: time at: "07:15:00" - action: + actions: - action: fan.set_direction target: entity_id: fan.kitchen @@ -122,10 +122,10 @@ Sets the oscillation for fan device. ```yaml automation: - trigger: + triggers: platform: time at: "07:15:00" - action: + actions: - action: fan.oscillate target: entity_id: fan.kitchen @@ -156,10 +156,10 @@ Turn fan device off. This is only supported if the fan device supports being tur ```yaml automation: - trigger: + triggers: platform: time at: "07:15:00" - action: + actions: - action: fan.turn_off target: entity_id: fan.kitchen @@ -180,13 +180,13 @@ Increases the speed of the fan device. ```yaml automation: - trigger: + triggers: - platform: device device_id: 097cd9f706a86e9163acb64ba7d630da domain: lutron_caseta type: press subtype: raise - action: + actions: - action: fan.increase_speed target: entity_id: fan.dining_room_fan_by_front_door @@ -205,13 +205,13 @@ Decreases the speed of the fan device. ```yaml automation: - trigger: + triggers: - platform: device device_id: 097cd9f706a86e9163acb64ba7d630da domain: lutron_caseta type: press subtype: lower - action: + actions: - action: fan.decrease_speed target: entity_id: fan.dining_room_fan_by_front_door diff --git a/source/_integrations/feedreader.markdown b/source/_integrations/feedreader.markdown index 784a0d823e8..b25a1daf119 100644 --- a/source/_integrations/feedreader.markdown +++ b/source/_integrations/feedreader.markdown @@ -29,10 +29,10 @@ Feedreader events can be used out of the box to trigger automation actions, e.g. ```yaml automation: - alias: "Trigger action when new element(s) in RSS feed" - trigger: + triggers: platform: event event_type: feedreader - action: + actions: action: script.turn_on target: entity_id: script.my_action @@ -43,12 +43,12 @@ automation: ```yaml automation: - alias: "Send notification of RSS feed title when updated" - trigger: + triggers: platform: event event_type: feedreader event_data: feed_url: "https://hasspodcast.io/feed/podcast" - action: + actions: action: persistent_notification.create data: title: "New HA Podcast available" diff --git a/source/_integrations/fireservicerota.markdown b/source/_integrations/fireservicerota.markdown index 2fd2f03d56b..346db362d10 100644 --- a/source/_integrations/fireservicerota.markdown +++ b/source/_integrations/fireservicerota.markdown @@ -117,27 +117,27 @@ These are documented below. ```yaml automation: - alias: "Switch on a light when incident is received" - trigger: + triggers: platform: state entity_id: sensor.incidents - action: + actions: action: light.turn_on target: entity_id: light.bedroom - alias: "Play TTS incident details when incident is received" - trigger: + triggers: platform: state entity_id: sensor.incidents attribute: message_to_speech_url - condition: + conditions: - condition: not conditions: - condition: state entity_id: sensor.incidents attribute: message_to_speech_url state: None - action: + actions: - action: media_player.play_media data_template: entity_id: media_player.nest_hub_bedroom @@ -146,10 +146,10 @@ automation: media_content_type: "audio/mp4" - alias: "Send response acknowledgement when a button is pressed" - trigger: + triggers: platform: state entity_id: switch.response_button - action: + actions: action: homeassistant.turn_on target: entity_id: switch.incident_response @@ -158,7 +158,7 @@ automation: trigger: platform: homeassistant event: start - action: + actions: action: cast.show_lovelace_view data: entity_id: media_player.nest_hub_bedroom diff --git a/source/_integrations/flic.markdown b/source/_integrations/flic.markdown index 747c52c83cc..eaf54252143 100644 --- a/source/_integrations/flic.markdown +++ b/source/_integrations/flic.markdown @@ -78,13 +78,13 @@ The flic integration fires `flic_click` events on the bus. You can capture the e # Example configuration.yaml automation entry automation: - alias: "Turn on lights in the living room when flic is pressed once" - trigger: + triggers: platform: event event_type: flic_click event_data: button_name: flic_81e4ac74b6d2 click_type: single - action: + actions: action: homeassistant.turn_on target: entity_id: group.lights_livingroom @@ -104,10 +104,10 @@ To help detect and debug flic button clicks, you can use this automation that se ```yaml automation: - alias: "FLIC Html5 notify on every click" - trigger: + triggers: platform: event event_type: flic_click - action: + actions: - action: notify.html5 data: title: "flic click" diff --git a/source/_integrations/flume.markdown b/source/_integrations/flume.markdown index 200f9ef6204..1514396f28b 100644 --- a/source/_integrations/flume.markdown +++ b/source/_integrations/flume.markdown @@ -49,10 +49,10 @@ Example of an automation that sends a Home Assistant notification of the most re ```yaml alias: "Notify: flume" -trigger: +triggers: - platform: time_pattern minutes: /5 -action: +actions: - action: flume.list_notifications data: config_entry: 1234 # replace this with your config entry id diff --git a/source/_integrations/folder_watcher.markdown b/source/_integrations/folder_watcher.markdown index 4d6dd3ce214..7d14504ec59 100644 --- a/source/_integrations/folder_watcher.markdown +++ b/source/_integrations/folder_watcher.markdown @@ -53,10 +53,10 @@ Automations can be triggered on file system events data using a template. The fo #Send notification for new image (including the image itself) automation:  alias: "New file alert" - trigger: + triggers:   platform: state entity_id: event.created - action: + actions:   action: notify.notify   data:     title: New image captured! diff --git a/source/_integrations/foursquare.markdown b/source/_integrations/foursquare.markdown index b09830bb3f4..4f763ef6823 100644 --- a/source/_integrations/foursquare.markdown +++ b/source/_integrations/foursquare.markdown @@ -58,10 +58,10 @@ Foursquare check-in events can be used out of the box to trigger automation acti ```yaml automation: - alias: "Trigger action when you check into a venue." - trigger: + triggers: platform: event event_type: foursquare.push - action: + actions: action: script.turn_on target: entity_id: script.my_action diff --git a/source/_integrations/fritz.markdown b/source/_integrations/fritz.markdown index dbeedcb45b5..d86f53cb1a6 100644 --- a/source/_integrations/fritz.markdown +++ b/source/_integrations/fritz.markdown @@ -116,10 +116,10 @@ fritz_box_reconnect: ```yaml automation: - alias: "Reconnect FRITZ!Box" - trigger: + triggers: - platform: time at: "05:00:00" - action: + actions: - action: button.press target: entity_id: button.fritzbox_7530_reconnect @@ -131,11 +131,11 @@ automation: ```yaml automation: - alias: "Guests Wi-Fi Turned On -> Send Password To Phone" - trigger: + triggers: - platform: state entity_id: switch.fritzbox_7530_wifi_myssid to: "on" - action: + actions: - action: notify.notify data: title: "Guest Wi-Fi is enabled" diff --git a/source/_integrations/fritzbox_callmonitor.markdown b/source/_integrations/fritzbox_callmonitor.markdown index d22246789e9..6ad52c4cca5 100644 --- a/source/_integrations/fritzbox_callmonitor.markdown +++ b/source/_integrations/fritzbox_callmonitor.markdown @@ -52,10 +52,10 @@ This example shows how to send notifications whenever the sensor's state changes # Example configuration.yaml entry. automation: - alias: "Notify about phone state" - trigger: + triggers: - platform: state entity_id: sensor.phone - action: + actions: - action: notify.notify data: title: "Phone" diff --git a/source/_integrations/frontier_silicon.markdown b/source/_integrations/frontier_silicon.markdown index 85963dd323e..37a0a323e2e 100644 --- a/source/_integrations/frontier_silicon.markdown +++ b/source/_integrations/frontier_silicon.markdown @@ -49,12 +49,12 @@ In case your device (friendly name) is called *badezimmer*, an example automatio ```yaml # Example configuration.yaml automation alias: "Bathroom Motion Detected" -trigger: +triggers: platform: state entity_id: binary_sensor.motion_sensor_166d0001171111 from: "off" to: "on" -action: +actions: action: media_player.turn_on target: entity_id: "media_player.badezimmer" diff --git a/source/_integrations/geniushub.markdown b/source/_integrations/geniushub.markdown index 9664ac157a6..aa88d2b86f8 100644 --- a/source/_integrations/geniushub.markdown +++ b/source/_integrations/geniushub.markdown @@ -91,11 +91,11 @@ Each such entity has a state attribute that will contain a list of any such issu ```yaml - alias: "GeniusHub Error Alerts" - trigger: + triggers: platform: numeric_state entity_id: sensor.geniushub_errors above: 0 - action: + actions: - action: notify.pushbullet_notifier data: title: "Genius Hub has errors" @@ -112,10 +112,10 @@ This alert may be useful to see if the CH is being turned on whilst you're on a ```yaml - alias: "GeniusHub CH State Change Alert" - trigger: + triggers: platform: state entity_id: binary_sensor.dual_channel_receiver_2_1 - action: + actions: - action: notify.pushbullet_notifier data: title: "Warning: CH State Change!" diff --git a/source/_integrations/geo_location.markdown b/source/_integrations/geo_location.markdown index d6b3f44cc53..746ad827e71 100644 --- a/source/_integrations/geo_location.markdown +++ b/source/_integrations/geo_location.markdown @@ -56,15 +56,15 @@ zone: automation: - alias: "Bush Fire Alert" - trigger: + triggers: platform: geo_location source: nsw_rural_fire_service_feed zone: zone.bush_fire_alert_zone event: enter - condition: + conditions: condition: template value_template: "{{ trigger.to_state.attributes.type == 'Bush Fire' }}" - action: + actions: - action: persistent_notification.create data: message: "{{ trigger.to_state.name }} - {{ trigger.to_state.attributes.status }}" diff --git a/source/_integrations/github.markdown b/source/_integrations/github.markdown index 5eaf673e69e..a407279497c 100644 --- a/source/_integrations/github.markdown +++ b/source/_integrations/github.markdown @@ -128,10 +128,10 @@ This example uses the [Latest release](#latest-release) entity provided by this {% raw %} ```yaml -trigger: +triggers: - platform: state entity_id: sensor.awesome_repository_latest_release -action: +actions: - action: notify.notify data: title: "New github/repository release" @@ -150,10 +150,10 @@ This example uses the [Stars](#diagnostic-entities) diagnostic entity provided b {% raw %} ```yaml -trigger: +triggers: - platform: state entity_id: sensor.awesome_repository_stars -action: +actions: - action: notify.notify data: title: "New github/repository new star" diff --git a/source/_integrations/goodwe.markdown b/source/_integrations/goodwe.markdown index f058617268d..a8d5dad6bb3 100644 --- a/source/_integrations/goodwe.markdown +++ b/source/_integrations/goodwe.markdown @@ -45,12 +45,12 @@ The integration will poll the inverter for new values every 10 seconds. If you w ```yaml - alias: "Goodwe inverter data polling" - trigger: + triggers: - platform: time_pattern hours: "*" minutes: "*" seconds: "/30" - action: + actions: - action: homeassistant.update_entity target: entity_id: sensor.ppv diff --git a/source/_integrations/google_travel_time.markdown b/source/_integrations/google_travel_time.markdown index cf779066813..229d79fa0da 100644 --- a/source/_integrations/google_travel_time.markdown +++ b/source/_integrations/google_travel_time.markdown @@ -70,10 +70,10 @@ You can use the `homeassistant.update_entity` action to update the sensor on-dem - id: update_morning_commute_sensor alias: "Commute - Update morning commute sensor" initial_state: "on" - trigger: + triggers: - platform: time_pattern minutes: "/2" - condition: + conditions: - condition: time after: "08:00:00" before: "11:00:00" @@ -84,7 +84,7 @@ You can use the `homeassistant.update_entity` action to update the sensor on-dem - wed - thu - fri - action: + actions: - action: homeassistant.update_entity target: entity_id: sensor.morning_commute diff --git a/source/_integrations/harmony.markdown b/source/_integrations/harmony.markdown index 5c5dfcd0df9..c762dca3c96 100644 --- a/source/_integrations/harmony.markdown +++ b/source/_integrations/harmony.markdown @@ -80,7 +80,7 @@ In the file 'harmony_REMOTENAME.conf' you can find the available activities, for Using the activity name 'Watch TV', you can perform an action via automation to switch this activity on: ```yaml -action: +actions: - action: remote.turn_on target: entity_id: remote.bed_room_hub @@ -205,24 +205,24 @@ The example below shows how to control an `input_boolean` switch using the Harmo ```yaml automation: - alias: "Watch TV started from harmony hub" - trigger: + triggers: platform: state entity_id: remote.family_room - condition: + conditions: condition: template value_template: '{{ trigger.to_state.attributes.current_activity == "Kodi" }}' - action: + actions: action: input_boolean.turn_on target: entity_id: input_boolean.notify - alias: "PowerOff started from harmony hub" - trigger: + triggers: platform: state entity_id: remote.family_room - condition: + conditions: condition: template value_template: '{{ trigger.to_state.attributes.current_activity == "PowerOff" }}' - action: + actions: action: input_boolean.turn_off target: entity_id: input_boolean.notify diff --git a/source/_integrations/hdmi_cec.markdown b/source/_integrations/hdmi_cec.markdown index 31e3dec4532..9c93c7f45a8 100644 --- a/source/_integrations/hdmi_cec.markdown +++ b/source/_integrations/hdmi_cec.markdown @@ -170,7 +170,7 @@ Use the `hdmi_cec.select_device` action with the name of the device from configu So an Automation action using the example above would look something like this. ```yaml -action: +actions: action: hdmi_cec.select_device data: device: Chromecast @@ -183,7 +183,7 @@ Use the `hdmi_cec.power_on` action (no arguments) to power on any devices that s An Automation action using the example above would look something like this. ```yaml -action: +actions: action: hdmi_cec.power_on ``` @@ -194,7 +194,7 @@ Use the `hdmi_cec.standby` action (no arguments) to place in standby any devices An Automation action using the example above would look something like this. ```yaml -action: +actions: action: hdmi_cec.standby ``` diff --git a/source/_integrations/here_travel_time.markdown b/source/_integrations/here_travel_time.markdown index 93f6601a888..cf2b1dcad99 100644 --- a/source/_integrations/here_travel_time.markdown +++ b/source/_integrations/here_travel_time.markdown @@ -71,10 +71,10 @@ automation: - id: update_morning_commute_sensor alias: "Commute - Update morning commute sensor" initial_state: "on" - trigger: + triggers: - platform: time_pattern minutes: "/2" - condition: + conditions: - condition: time after: "08:00:00" before: "11:00:00" @@ -85,7 +85,7 @@ automation: - wed - thu - fri - action: + actions: - action: homeassistant.update_entity target: entity_id: sensor.morning_commute diff --git a/source/_integrations/homeassistant.markdown b/source/_integrations/homeassistant.markdown index 3d510f27d9f..24122d649c9 100644 --- a/source/_integrations/homeassistant.markdown +++ b/source/_integrations/homeassistant.markdown @@ -313,7 +313,7 @@ Update the location of the Home Assistant default zone (usually "Home"). #### Example ```yaml -action: +actions: action: homeassistant.set_location data: latitude: 32.87336 @@ -335,7 +335,7 @@ for example, a light and a switch can be toggled in a single action. #### Example ```yaml -action: +actions: action: homeassistant.toggle target: entity_id: @@ -357,7 +357,7 @@ for example, a light and a switch can be turned on in a single action. #### Example ```yaml -action: +actions: action: homeassistant.turn_on target: entity_id: @@ -379,7 +379,7 @@ for example, a light and a switch can be turned off in a single action. #### Example ```yaml -action: +actions: action: homeassistant.turn_off target: entity_id: @@ -398,7 +398,7 @@ Force one or more entities to update its data rather than wait for the next sche #### Example ```yaml -action: +actions: action: homeassistant.update_entity target: entity_id: diff --git a/source/_integrations/homekit.markdown b/source/_integrations/homekit.markdown index 455dec8c815..95a54bd103b 100644 --- a/source/_integrations/homekit.markdown +++ b/source/_integrations/homekit.markdown @@ -454,14 +454,14 @@ The key name will be available in the event data in the `key_name` field. Exampl ```yaml automation: - trigger: + triggers: platform: event event_type: homekit_tv_remote_key_pressed event_data: key_name: arrow_right # Send the arrow right key via a broadlink IR blaster - action: + actions: action: broadlink.send host: 192.168.1.55 packet: XXXXXXXX @@ -474,13 +474,13 @@ The HomeKit integration emits `homekit_state_change` events. These events can be ```yaml # Example for handling a HomeKit event automation: - trigger: + triggers: - platform: event event_type: homekit_state_change event_data: entity_id: cover.garage_door action: open_cover - action: + actions: - action: persistent_notification.create data: message: "The garage door got opened via HomeKit" diff --git a/source/_integrations/homematic.markdown b/source/_integrations/homematic.markdown index 63af5ad4c35..c2b6253a7ce 100644 --- a/source/_integrations/homematic.markdown +++ b/source/_integrations/homematic.markdown @@ -252,14 +252,14 @@ Here's an example of how to use these events for automations: ```yaml automation: - trigger: + triggers: platform: event event_type: homematic.keypress event_data: name: "Kitchen Switch" channel: 1 param: PRESS_SHORT - action: + actions: action: switch.turn_on target: entity_id: switch.Kitchen_Ambience @@ -306,7 +306,7 @@ Simulate a button being pressed: ```yaml ... -action: +actions: action: homematic.virtualkey data: address: "BidCoS-RF" @@ -318,7 +318,7 @@ Open KeyMatic: ```yaml ... -action: +actions: action: homematic.virtualkey data: address: "LEQ1234567" @@ -330,7 +330,7 @@ Set boolean variable to true: ```yaml ... -action: +actions: action: homematic.set_variable_value target: entity_id: homematic.ccu2 @@ -348,7 +348,7 @@ Manually turn on a switch actor: ```yaml ... -action: +actions: action: homematic.set_device_value data: address: "LEQ1234567" @@ -361,7 +361,7 @@ Manually set temperature on thermostat: ```yaml ... -action: +actions: action: homematic.set_device_value data: address: "LEQ1234567" @@ -374,7 +374,7 @@ Manually set the active profile on thermostat: ```yaml ... -action: +actions: action: homematic.set_device_value data: address: "LEQ1234567" @@ -388,7 +388,7 @@ Set the week program of a wall thermostat: ```yaml ... -action: +actions: action: homematic.put_paramset data: interface: wireless @@ -402,7 +402,7 @@ Set the week program of a wall thermostat with explicit `rx_mode` (BidCos-RF onl ```yaml ... -action: +actions: action: homematic.put_paramset data: interface: wireless @@ -423,7 +423,7 @@ Manually set lock on KeyMatic devices: ```yaml ... -action: +actions: action: lock.lock target: entity_id: lock.leq1234567 @@ -433,7 +433,7 @@ Manually set unlock on KeyMatic devices: ```yaml ... -action: +actions: action: lock.unlock target: entity_id: lock.leq1234567 @@ -488,11 +488,11 @@ template: automation: - alias: "Homematic Reconnect" - trigger: + triggers: platform: state entity_id: binary_sensor.homematic_is_sending_updates to: "off" - action: + actions: # Reconnect, if sensor has not been updated for over 10 minutes action: homematic.reconnect ``` @@ -534,10 +534,10 @@ automation: ```yaml automation: - alias: "Homematic CCU Reboot" - trigger: + triggers: platform: state entity_id: sensor.v_last_reboot - action: + actions: action: homematic.reconnect ``` diff --git a/source/_integrations/homematicip_cloud.markdown b/source/_integrations/homematicip_cloud.markdown index 5b5b696539a..034e55c47cb 100644 --- a/source/_integrations/homematicip_cloud.markdown +++ b/source/_integrations/homematicip_cloud.markdown @@ -234,7 +234,7 @@ Activate eco mode with duration. ```yaml ... -action: +actions: action: homematicip_cloud.activate_eco_mode_with_duration data: duration: 60 @@ -245,7 +245,7 @@ Activate eco mode with period. ```yaml ... -action: +actions: action: homematicip_cloud.activate_eco_mode_with_period data: endtime: 2019-09-17 18:00 @@ -256,7 +256,7 @@ Activates the vacation mode until the given time. ```yaml ... -action: +actions: action: homematicip_cloud.activate_vacation data: endtime: 2019-09-17 18:00 @@ -268,7 +268,7 @@ Deactivates the eco mode immediately. ```yaml ... -action: +actions: action: homematicip_cloud.deactivate_eco_mode data: accesspoint_id: 3014xxxxxxxxxxxxxxxxxxxx @@ -278,7 +278,7 @@ Deactivates the vacation mode immediately. ```yaml ... -action: +actions: action: homematicip_cloud.deactivate_vacation data: accesspoint_id: 3014xxxxxxxxxxxxxxxxxxxx @@ -291,7 +291,7 @@ You can get the required index from the native Homematic IP App. ```yaml ... -action: +actions: action: homematicip_cloud.set_active_climate_profile target: entity_id: climate.livingroom @@ -303,7 +303,7 @@ Dump the configuration of the Homematic IP Access Point(s). ```yaml ... -action: +actions: action: homematicip_cloud.dump_hap_config data: anonymize: True @@ -313,7 +313,7 @@ Reset energy counter of measuring actuators. ```yaml ... -action: +actions: action: homematicip_cloud.reset_energy_counter target: entity_id: switch.livingroom @@ -323,7 +323,7 @@ Enable (or disable) Cooling mode for the entire home. Disabling Cooling mode wil ```yaml ... -action: +actions: action: homematicip_cloud.set_home_cooling_mode data: cooling: True diff --git a/source/_integrations/honeywell.markdown b/source/_integrations/honeywell.markdown index 0f27d947963..a873271e758 100644 --- a/source/_integrations/honeywell.markdown +++ b/source/_integrations/honeywell.markdown @@ -55,13 +55,13 @@ Due to the instability of the Honeywell total connect system, actions within aut ```yaml alias: "No one home" description: "Everyone has left home" -trigger: +triggers: - platform: numeric_state entity_id: zone.home for: minutes: 10 below: 1 -action: +actions: - repeat: sequence: - action: climate.set_temperature diff --git a/source/_integrations/html5.markdown b/source/_integrations/html5.markdown index ff8ed39a08b..c6de38cad59 100644 --- a/source/_integrations/html5.markdown +++ b/source/_integrations/html5.markdown @@ -107,10 +107,10 @@ Example of adding a tag to your notification. This won't create new notification ```yaml - alias: "Push/update notification of sensor state with tag" - trigger: + triggers: - platform: state entity_id: sensor.sensor - action: + actions: action: notify.html5 data: message: "Last known sensor state is {{ states('sensor.sensor') }}." @@ -207,7 +207,7 @@ notification is received on the device. ```yaml - alias: "HTML5 push notification received and displayed on device" - trigger: + triggers: platform: event event_type: html5_notification.received ``` @@ -218,7 +218,7 @@ You will receive an event named `html5_notification.clicked` when the notificati ```yaml - alias: "HTML5 push notification clicked" - trigger: + triggers: platform: event event_type: html5_notification.clicked ``` @@ -227,7 +227,7 @@ or ```yaml - alias: "HTML5 push notification action button clicked" - trigger: + triggers: platform: event event_type: html5_notification.clicked event_data: @@ -240,7 +240,7 @@ You will receive an event named `html5_notification.closed` when the notificatio ```yaml - alias: "HTML5 push notification clicked" - trigger: + triggers: platform: event event_type: html5_notification.closed ``` diff --git a/source/_integrations/humidifier.markdown b/source/_integrations/humidifier.markdown index cc0f8fad3f8..5bd2f00406c 100644 --- a/source/_integrations/humidifier.markdown +++ b/source/_integrations/humidifier.markdown @@ -69,10 +69,10 @@ Set mode for the humidifier device. This action is only available if the device ```yaml automation: - trigger: + triggers: - platform: time at: "07:15:00" - action: + actions: - action: humidifier.set_mode target: entity_id: humidifier.bedroom @@ -93,10 +93,10 @@ Set target humidity of the humidifier device ```yaml automation: - trigger: + triggers: - platform: time at: "07:15:00" - action: + actions: - action: humidifier.set_humidity target: entity_id: humidifier.bedroom diff --git a/source/_integrations/hunterdouglas_powerview.markdown b/source/_integrations/hunterdouglas_powerview.markdown index cd8566d514d..4f69ec6231b 100644 --- a/source/_integrations/hunterdouglas_powerview.markdown +++ b/source/_integrations/hunterdouglas_powerview.markdown @@ -224,10 +224,10 @@ Velocity controls the speed of the shade. The default speed from Hunter Douglas ``` yaml alias: "Blinds closed at night" -trigger: +triggers: platform: time at: "18:00:00" -action: +actions: - action: scene.turn_on target: entity_id: scene.10877 @@ -241,10 +241,10 @@ This automation is not recommended for battery-powered shades. alias: Force Update description: 'Update the position of defined shades' mode: single -trigger: +triggers: - platform: time_pattern hours: '1' -action: +actions: - action: homeassistant.update_entity target: entity_id: diff --git a/source/_integrations/hyperion.markdown b/source/_integrations/hyperion.markdown index 78bf1989306..b4c062e3741 100644 --- a/source/_integrations/hyperion.markdown +++ b/source/_integrations/hyperion.markdown @@ -113,11 +113,11 @@ To start Hyperion with an effect, use the following automation: automation: - id: one alias: "Turn Hyperion effect on when light goes on" - trigger: + triggers: - platform: state entity_id: light.hyperion to: "on" - action: + actions: - action: light.turn_on target: entity_id: light.hyperion @@ -129,7 +129,7 @@ To have the lights playing an effect when pausing, idle or turn off a media play ```yaml - alias: "Set hyperion effect after playback" - trigger: + triggers: - platform: state entity_id: media_player.plex to: "off" @@ -139,7 +139,7 @@ To have the lights playing an effect when pausing, idle or turn off a media play - platform: state entity_id: media_player.plex.plex to: "idle" - action: + actions: - action: light.turn_on target: entity_id: light.hyperion @@ -151,11 +151,11 @@ To capture the screen on a USB capture device, when playing something on a media ```yaml - alias: "Set hyperion when playback starts" - trigger: + triggers: - platform: state entity_id: media_player.plex to: "playing" - action: + actions: - action: switch.turn_on target: entity_id: switch.[instance]_component_usb_capture @@ -165,17 +165,17 @@ To toggle the LED device together with the light entity in order to turn light o ```yaml - alias: "Turn LED device on when Hyperion light is activated" - trigger: + triggers: - platform: state entity_id: - light.hyperion from: "off" to: "on" - condition: + conditions: - condition: state entity_id: switch.[instance]_component_led_device state: "off" - action: + actions: - action: switch.turn_on target: entity_id: switch.[instance]_component_led_device diff --git a/source/_integrations/ibeacon.markdown b/source/_integrations/ibeacon.markdown index ef44d6fadc5..9144fccefa5 100644 --- a/source/_integrations/ibeacon.markdown +++ b/source/_integrations/ibeacon.markdown @@ -92,7 +92,7 @@ To get the Estimated distance sensor to work, in most cases, it has to be calibr ```yaml alias: "The black trash can has left the building" mode: single -trigger: +triggers: - platform: state entity_id: sensor.black_trash_bin_estimated_distance to: "unavailable" @@ -107,7 +107,7 @@ trigger: minutes: 5 seconds: 0 above: 20 -action: +actions: - action: notify.notify data: message: "The black trash can has left the building" diff --git a/source/_integrations/ifttt.markdown b/source/_integrations/ifttt.markdown index 4d56b864deb..c5abbb053af 100644 --- a/source/_integrations/ifttt.markdown +++ b/source/_integrations/ifttt.markdown @@ -38,13 +38,13 @@ You then need to consume that incoming information with the following automation automation: - id: this_is_the_automation_id alias: "The optional automation alias" - trigger: + triggers: - platform: event event_type: ifttt_webhook_received event_data: action: call_service # the same action 'name' you used in the Body section of the IFTTT recipe - condition: [] - action: + conditions: + actions: - action: '{{ trigger.event.data.service }}' target: entity_id: '{{ trigger.event.data.entity_id }}' @@ -143,10 +143,10 @@ Add the *Then That* action. The below example sends a notification to the IFTTT # Example configuration.yaml Automation entry automation: alias: "Startup Notification" - trigger: + triggers: platform: homeassistant event: start - action: + actions: action: ifttt.trigger data: {"event":"TestHA_Trigger", "value1":"Hello World!"} ``` @@ -161,10 +161,10 @@ IFTTT can also be used in scripts and with templates. Here is the above automati # Example configuration.yaml Automation entry automation: alias: "Startup Notification" - trigger: + triggers: platform: homeassistant event: start - action: + actions: action: script.ifttt_notify data: value1: "HA Status:" diff --git a/source/_integrations/image_processing.markdown b/source/_integrations/image_processing.markdown index 9cb3e8f2824..8d5d10087d1 100644 --- a/source/_integrations/image_processing.markdown +++ b/source/_integrations/image_processing.markdown @@ -34,7 +34,7 @@ The `found_plate` event is triggered after OpenALPR has found a new license plat # Example configuration.yaml automation entry automation: - alias: "Open garage door" - trigger: + triggers: platform: event event_type: image_processing.found_plate event_data: @@ -55,7 +55,7 @@ The `detect_face` event is triggered after a Face entity has found a face. # Example configuration.yaml automation entry automation: - alias: "Known person in front of my door" - trigger: + triggers: platform: event event_type: image_processing.detect_face event_data: @@ -78,11 +78,11 @@ sensor: ... automation: - alias: "Scan for faces when motion detected" - trigger: + triggers: - platform: state entity_id: sensor.door_motion_sensor to: "on" - action: + actions: - action: image_processing.scan target: entity_id: image_processing.door diff --git a/source/_integrations/imap.markdown b/source/_integrations/imap.markdown index ef205fc0666..df85cf2cf42 100644 --- a/source/_integrations/imap.markdown +++ b/source/_integrations/imap.markdown @@ -145,7 +145,7 @@ Increasing the default maximum message size (2048 bytes) could have a negative i ```yaml template: - - trigger: + - triggers: - platform: event event_type: "imap_content" id: "custom_event" @@ -196,15 +196,15 @@ The example below filters the event trigger by `entry_id`, fetches the message a ```yaml alias: imap fetch and seen example description: Fetch and mark an incoming message as seen -trigger: +triggers: - platform: event event_type: imap_content event_data: entry_id: 91fadb3617c5a3ea692aeb62d92aa869 -condition: +conditions: - condition: template value_template: "{{ trigger.event.data['sender'] == 'info@example.com' }}" -action: +actions: - action: imap.fetch data: entry: 91fadb3617c5a3ea692aeb62d92aa869 @@ -231,7 +231,7 @@ The following example shows the usage of the IMAP email content sensor to scan t ```yaml template: - - trigger: + - triggers: - platform: event event_type: "imap_content" id: "custom_event" @@ -269,7 +269,7 @@ Below is the template sensor which extracts the information from the body of the ```yaml template: - - trigger: + - triggers: - platform: event event_type: "imap_content" id: "custom_event" @@ -318,7 +318,7 @@ The example below will only set the state to the subject of the email of templat ```yaml template: - - trigger: + - triggers: - platform: event event_type: "imap_content" id: "custom_event" diff --git a/source/_integrations/incomfort.markdown b/source/_integrations/incomfort.markdown index 483197614f8..6a0a0c6eb53 100644 --- a/source/_integrations/incomfort.markdown +++ b/source/_integrations/incomfort.markdown @@ -48,11 +48,11 @@ To send an alert if the CV pressure is too low or too high, consider the followi ```yaml - alias: "Low CV Pressure Alert" - trigger: + triggers: platform: numeric_state entity_id: sensor.cv_pressure below: 1.0 - action: + actions: - action: notify.pushbullet_notifier data: title: "Warning: Low CH Pressure" diff --git a/source/_integrations/input_boolean.markdown b/source/_integrations/input_boolean.markdown index 2c9597b0e39..22c4e41cc58 100644 --- a/source/_integrations/input_boolean.markdown +++ b/source/_integrations/input_boolean.markdown @@ -88,15 +88,15 @@ will only occur if the `input_boolean` is on. ```yaml automation: alias: "Arriving home" - trigger: + triggers: - platform: state entity_id: binary_sensor.motion_garage to: "on" - condition: + conditions: - condition: state entity_id: input_boolean.notify_home state: "on" - action: + actions: - action: notify.pushbullet data: title: "" diff --git a/source/_integrations/input_button.markdown b/source/_integrations/input_button.markdown index 805636c71aa..58d47a8a537 100644 --- a/source/_integrations/input_button.markdown +++ b/source/_integrations/input_button.markdown @@ -67,10 +67,10 @@ Because the state of a input button entity in Home Assistant is a timestamp, it means we can use it in our automations. For example: ```yaml -trigger: +triggers: - platform: state entity_id: input_button.my_button -action: +actions: - action: notify.frenck data: message: "My button has been pressed!" diff --git a/source/_integrations/input_datetime.markdown b/source/_integrations/input_datetime.markdown index 4d72f439c61..bd6b7963b49 100644 --- a/source/_integrations/input_datetime.markdown +++ b/source/_integrations/input_datetime.markdown @@ -117,10 +117,10 @@ automation: # Example configuration.yaml entry # Turns on bedroom light at the time specified. automation: - trigger: + triggers: platform: time at: input_datetime.bedroom_alarm_clock_time - action: + actions: action: light.turn_on target: entity_id: light.bedroom diff --git a/source/_integrations/input_number.markdown b/source/_integrations/input_number.markdown index 3ae736e3145..1221f5d2d9f 100644 --- a/source/_integrations/input_number.markdown +++ b/source/_integrations/input_number.markdown @@ -127,10 +127,10 @@ input_number: step: 1 automation: - alias: "Bedroom Light - Adjust Brightness" - trigger: + triggers: platform: state entity_id: input_number.bedroom_brightness - action: + actions: - action: light.turn_on target: entity_id: light.bedroom @@ -166,11 +166,11 @@ input_number: step: 1 automation: - alias: "Bedroom Light - Custom" - trigger: + triggers: platform: state entity_id: input_select.scene_bedroom to: CUSTOM - action: + actions: - action: light.turn_on target: entity_id: light.bedroom @@ -199,10 +199,10 @@ input_number: # It sets the value slider on the GUI. This slides also had its own automation when the value is changed. automation: - alias: "Set temp slider" - trigger: + triggers: platform: mqtt topic: "setTemperature" - action: + actions: action: input_number.set_value target: entity_id: input_number.target_temp @@ -212,10 +212,10 @@ automation: # 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. - alias: "Temp slider moved" - trigger: + triggers: platform: state entity_id: input_number.target_temp - action: + actions: action: mqtt.publish data: topic: "setTemperature" @@ -250,11 +250,11 @@ input_number: automation: - alias: "turn something off after x time after turning it on" - trigger: + triggers: platform: state entity_id: switch.something to: "on" - action: + actions: - delay: "00:{{ states('input_number.minutes') | int }}:{{ states('input_number.seconds') | int }}" - action: switch.turn_off target: diff --git a/source/_integrations/input_select.markdown b/source/_integrations/input_select.markdown index 3c416aaf829..c6ef2d6a3b1 100644 --- a/source/_integrations/input_select.markdown +++ b/source/_integrations/input_select.markdown @@ -135,10 +135,10 @@ The following example shows the usage of the `input_select.select_option` action # Example configuration.yaml entry automation: - alias: "example automation" - trigger: + triggers: platform: event event_type: MY_CUSTOM_EVENT - action: + actions: - action: input_select.select_option target: entity_id: input_select.who_cooks @@ -152,10 +152,10 @@ To dynamically set the `input_select` options you can call `input_select.set_opt # Example configuration.yaml entry automation: - alias: "example automation" - trigger: + triggers: platform: event event_type: MY_CUSTOM_EVENT - action: + actions: - action: input_select.set_options target: entity_id: input_select.who_cooks @@ -185,11 +185,11 @@ input_select: # This automation script runs when a value is received via MQTT on retained topic: thermostatMode # 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" - trigger: + triggers: platform: mqtt topic: "thermostatMode" # entity_id: input_select.thermostat_mode - action: + actions: action: input_select.select_option target: entity_id: input_select.thermostat_mode @@ -199,10 +199,10 @@ input_select: # 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. - alias: "Set Thermostat Mode" - trigger: + triggers: platform: state entity_id: input_select.thermostat_mode - action: + actions: action: mqtt.publish data: topic: "thermostatMode" diff --git a/source/_integrations/input_text.markdown b/source/_integrations/input_text.markdown index 414c22bd29c..1224a7724c3 100644 --- a/source/_integrations/input_text.markdown +++ b/source/_integrations/input_text.markdown @@ -129,10 +129,10 @@ input_text: automation: - alias: "Bedroom Light - Custom" - trigger: + triggers: platform: state entity_id: input_select.scene_bedroom - action: + actions: - action: input_text.set_value target: entity_id: input_text.bedroom diff --git a/source/_integrations/insteon.markdown b/source/_integrations/insteon.markdown index a51ddb2ae08..9130a463448 100644 --- a/source/_integrations/insteon.markdown +++ b/source/_integrations/insteon.markdown @@ -134,7 +134,7 @@ automation: # Trigger an Insteon scene 25 - id: trigger_scene_25_on alias: "Turn on scene 25" - action: + actions: - action: insteon.scene_on group: 25 ``` @@ -157,17 +157,17 @@ automation: # 4 or 8 button remote with button c pressed - id: light_on alias: "Turn a light on" - trigger: + triggers: - platform: event event_type: insteon.button_on event_data: address: 1a2b3c button: c - condition: + conditions: - condition: state entity_id: light.some_light state: "off" - action: + actions: - action: light.turn_on target: entity_id: light.some_light @@ -175,16 +175,16 @@ automation: # single button remote - id: light_off alias: "Turn a light off" - trigger: + triggers: - platform: event event_type: insteon.button_on event_data: address: 1a2b3c - condition: + conditions: - condition: state entity_id: light.some_light state: "off" - action: + actions: - action: light.turn_on target: entity_id: light.some_light diff --git a/source/_integrations/intent_script.markdown b/source/_integrations/intent_script.markdown index d8a70a8f69e..d6188ae35d2 100644 --- a/source/_integrations/intent_script.markdown +++ b/source/_integrations/intent_script.markdown @@ -46,7 +46,7 @@ intent: description: List of domains that the entity supports. required: false type: list - action: + actions: description: Defines an action to run to intents. required: false type: action @@ -109,7 +109,7 @@ conversation: intent_script: EventCountToday: - action: + actions: - action: calendar.get_events target: entity_id: calendar.my_calendar diff --git a/source/_integrations/isy994.markdown b/source/_integrations/isy994.markdown index 8c1ffcdc8fd..b056a960e7c 100644 --- a/source/_integrations/isy994.markdown +++ b/source/_integrations/isy994.markdown @@ -92,7 +92,7 @@ A Home Assistant `isy994_control` event is emitted for every "control" event in ```yaml automation: - alias: "turn off living room on double tap lightswitch" - trigger: + triggers: platform: event event_type: isy994_control event_data: @@ -102,7 +102,7 @@ automation: formatted: "On" uom: "100" prec: "0" - action: + actions: action: light.turn_off target: entity_id: light.lr_track_lights_rear diff --git a/source/_integrations/kaleidescape.markdown b/source/_integrations/kaleidescape.markdown index 7780582f554..b1163888015 100644 --- a/source/_integrations/kaleidescape.markdown +++ b/source/_integrations/kaleidescape.markdown @@ -229,11 +229,11 @@ A typical automation might look like the example below, which turns up the light ```yaml - alias: kaleidescape_theater_lights_up - trigger: + triggers: - platform: state entity_id: sensor.kaleidescape_theater_media_location from: content - action: + actions: - action: scene.turn_on target: entity_id: scene.theater_lights diff --git a/source/_integrations/keyboard_remote.markdown b/source/_integrations/keyboard_remote.markdown index 9d5bec04c05..b1d9cb4d777 100644 --- a/source/_integrations/keyboard_remote.markdown +++ b/source/_integrations/keyboard_remote.markdown @@ -93,7 +93,7 @@ And an automation rule to breathe life into it: ```yaml automation: alias: "Keyboard all lights on" - trigger: + triggers: platform: event event_type: keyboard_remote_command_received event_data: @@ -101,7 +101,7 @@ automation: key_code: 107 # inspect log to obtain desired keycode type: key_down # only trigger on key_down events (optional) - action: + actions: action: light.turn_on target: entity_id: light.all @@ -124,10 +124,10 @@ Here's an automation example that plays a sound through a media player whenever ```yaml automation: - alias: "Keyboard Connected" - trigger: + triggers: platform: event event_type: keyboard_remote_connected - action: + actions: - action: media_player.play_media target: entity_id: media_player.speaker @@ -136,12 +136,12 @@ automation: media_content_type: music - alias: "Bluetooth Keyboard Disconnected" - trigger: + triggers: platform: event event_type: keyboard_remote_disconnected event_data: device_name: "00:58:56:4C:C0:91" - action: + actions: - action: media_player.play_media target: entity_id: media_player.speaker diff --git a/source/_integrations/kira.markdown b/source/_integrations/kira.markdown index faa9296929c..230c90f47d7 100644 --- a/source/_integrations/kira.markdown +++ b/source/_integrations/kira.markdown @@ -211,12 +211,12 @@ Example automation using these IR codes to toggle a Sonoff plug. - id: "1583339338363" alias: "Panasonic On" description: Turn on sonoff s20 relay - trigger: + triggers: - entity_id: sensor.kira_wireless platform: state to: PanaOne - condition: [] - action: + conditions: [] + actions: - device_id: 3628b4f34df943b3b721ead954cf3ca7 domain: switch entity_id: switch.plug2_relay @@ -224,12 +224,12 @@ Example automation using these IR codes to toggle a Sonoff plug. - id: "1584035716024" alias: "Panaxonic Off " description: Turn off sonoff s20 relay - trigger: + triggers: - entity_id: sensor.kira_wireless platform: state to: PanaTwo - condition: [] - action: + conditions: [] + actions: - device_id: 3628b4f34df943b3b721ead954cf3ca7 domain: switch entity_id: switch.plug2_relay diff --git a/source/_integrations/knx.markdown b/source/_integrations/knx.markdown index f1304a491f4..e3231414e67 100644 --- a/source/_integrations/knx.markdown +++ b/source/_integrations/knx.markdown @@ -243,12 +243,12 @@ Example automation configuration ```yaml - alias: Single group address trigger description: '' - trigger: + triggers: - platform: knx.telegram destination: 1/2/3 group_value_read: false outgoing: false - condition: "{{ trigger.value == 0 }}" + conditions: "{{ trigger.value == 0 }}" action: [] mode: single ``` @@ -259,7 +259,7 @@ Example trigger data ```yaml variables: - trigger: + triggers: id: "0" idx: "0" alias: null @@ -368,21 +368,21 @@ address: ```yaml # Example automation to update a cover position after 10 seconds of movement initiation automation: - - trigger: + - triggers: - platform: knx.telegram # Cover move trigger destination: "0/4/20" - action: + actions: - delay: 0:0:10 - action: knx.read data: # Cover position address address: "0/4/21" - - trigger: + - triggers: - platform: homeassistant event: start - action: + actions: # Register the group address to trigger a knx_event - action: knx.event_register data: @@ -595,7 +595,7 @@ Let's pretend you have a binary sensor with the name `Livingroom.Switch` and you ```yaml # Example automation.yaml entry automation: - - trigger: + - triggers: platform: numeric_state entity_id: binary_sensor.livingroom_switch attribute: counter @@ -605,20 +605,20 @@ automation: - condition: state entity_id: binary_sensor.cover_abstell state: "on" - action: + actions: - entity_id: light.hue_color_lamp_1 action: light.turn_on - - trigger: + - triggers: platform: numeric_state entity_id: binary_sensor.livingroom_switch attribute: counter above: 1 below: 3 - condition: + conditions: - condition: state entity_id: binary_sensor.cover_abstell state: "on" - action: + actions: - entity_id: light.hue_bloom_1 action: homeassistant.turn_on - entity_id: light.hue_bloom_2 diff --git a/source/_integrations/kodi.markdown b/source/_integrations/kodi.markdown index 30a3ef1f0bf..35579b2a021 100644 --- a/source/_integrations/kodi.markdown +++ b/source/_integrations/kodi.markdown @@ -45,24 +45,24 @@ These automations can be configured through the UI (see [device triggers](/docs/ automation: - id: kodi_turn_on alias: "Kodi: turn on" - trigger: + triggers: - platform: device device_id: !secret kodi_device_id domain: kodi entity_id: media_player.kodi type: turn_on - action: + actions: - action: script.kodi_turn_on - id: kodi_turn_off alias: "Kodi: turn off" - trigger: + triggers: - platform: device device_id: !secret kodi_device_id domain: kodi entity_id: media_player.kodi type: turn_off - action: + actions: - action: script.kodi_turn_off ``` @@ -434,12 +434,12 @@ A example of a automation to turn up/down the volume of a receiver using the eve alias: Kodi keypress mode: parallel max: 10 -trigger: +triggers: - platform: event event_type: kodi_keypress event_data: entity_id: media_player.kodi_livingroom -action: +actions: - choose: - conditions: - condition: template diff --git a/source/_integrations/lametric.markdown b/source/_integrations/lametric.markdown index 3616b58b5ee..be2f71c5d1b 100644 --- a/source/_integrations/lametric.markdown +++ b/source/_integrations/lametric.markdown @@ -164,12 +164,12 @@ To add a notification sound, icon, cycles, or priority override, ```yaml - alias: "Send notification on arrival at school" - trigger: + triggers: platform: state entity_id: device_tracker.tom_mobile from: "not_home" to: "school" - action: + actions: action: notify.my_lametric data: message: "Tom has arrived at school!" diff --git a/source/_integrations/landisgyr_heat_meter.markdown b/source/_integrations/landisgyr_heat_meter.markdown index ab3ba2bc931..8d66dd48cb6 100644 --- a/source/_integrations/landisgyr_heat_meter.markdown +++ b/source/_integrations/landisgyr_heat_meter.markdown @@ -76,10 +76,10 @@ If you're comfortable with YAML, this code could be used: ```yaml alias: "Heat Meter manual update" -trigger: +triggers: - platform: time at: "23:30:00" -action: +actions: - action: homeassistant.update_entity target: entity_id: sensor.heat_meter_heat_usage_gj diff --git a/source/_integrations/lcn.markdown b/source/_integrations/lcn.markdown index 9814e43dbb6..9e392c3b9f9 100644 --- a/source/_integrations/lcn.markdown +++ b/source/_integrations/lcn.markdown @@ -162,11 +162,11 @@ Trigger on a transponder event and ensure that the received code is in the given ```yaml automation: - trigger: + triggers: - platform: event event_type: lcn_transponder condition: "{{ trigger.event.data.code in ['aabbcc', 'ddeeff', '112233'] }}" - action: + actions: ... ``` @@ -245,7 +245,7 @@ receiver hardware is connected to module 7 in segment 0. ```yaml automation: - trigger: + triggers: - platform: event event_type: lcn_transmitter event_data: @@ -270,7 +270,7 @@ any hardware module. ```yaml automation: - trigger: + triggers: - platform: event event_type: lcn_transponder event_data: @@ -292,7 +292,7 @@ any hardware module. ```yaml automation: - trigger: + triggers: - platform: event event_type: lcn_fingerprint event_data: @@ -314,7 +314,7 @@ any hardware module. ```yaml automation: - trigger: + triggers: - platform: event event_type: lcn_codelock event_data: @@ -337,7 +337,7 @@ key `a1`. ```yaml automation: - trigger: + triggers: - platform: event event_type: lcn_send_keys event_data: diff --git a/source/_integrations/lg_netcast.markdown b/source/_integrations/lg_netcast.markdown index 08897bd4b7c..bcac042ea38 100644 --- a/source/_integrations/lg_netcast.markdown +++ b/source/_integrations/lg_netcast.markdown @@ -39,10 +39,10 @@ wake_on_lan: # enables `wake_on_lan` integration # Enables the `lg_netcast` media player automation: - alias: "Turn On Living Room TV with WakeOnLan" - trigger: + triggers: - platform: lg_netcast.turn_on entity_id: media_player.lg_netcast_smart_tv - action: + actions: - action: wake_on_lan.send_magic_packet data: mac: AA-BB-CC-DD-EE-FF diff --git a/source/_integrations/lifx.markdown b/source/_integrations/lifx.markdown index eee75ca6755..6b1f8a312e1 100644 --- a/source/_integrations/lifx.markdown +++ b/source/_integrations/lifx.markdown @@ -95,9 +95,9 @@ The LIFX platform supports several software-controlled light effects and one har ```yaml automation: - alias: "..." - trigger: + triggers: # ... - action: + actions: - action: light.turn_on target: entity_id: light.office, light.kitchen diff --git a/source/_integrations/light.markdown b/source/_integrations/light.markdown index 02d464fb8c1..1dc8715f15b 100644 --- a/source/_integrations/light.markdown +++ b/source/_integrations/light.markdown @@ -79,11 +79,11 @@ In order to apply attributes to an entity, you will need to add `data:` to the c automation: - id: one alias: "Turn on light when motion is detected" - trigger: + triggers: - platform: state entity_id: binary_sensor.motion_1 to: "on" - action: + actions: - action: light.turn_on target: entity_id: light.living_room @@ -95,10 +95,10 @@ automation: # Ledlist morning on, red - id: llmor alias: "Stair morning on" - trigger: + triggers: - at: '05:00' platform: time - action: + actions: - action: light.turn_on target: entity_id: light.ledliststair diff --git a/source/_integrations/limitlessled.markdown b/source/_integrations/limitlessled.markdown index 41f267e39f5..93f61d4633a 100644 --- a/source/_integrations/limitlessled.markdown +++ b/source/_integrations/limitlessled.markdown @@ -111,9 +111,9 @@ Note that the `brightness`, `color` and `temperature` attributes cannot be used ```yaml automation: - alias: "..." - trigger: + triggers: # ... - action: + actions: - action: light.turn_on target: entity_id: diff --git a/source/_integrations/lirc.markdown b/source/_integrations/lirc.markdown index 8ab3bf28358..a73a29c4797 100644 --- a/source/_integrations/lirc.markdown +++ b/source/_integrations/lirc.markdown @@ -84,12 +84,12 @@ The LIRC integration fires `ir_command_received` events on the bus. You can capt # Example configuration.yaml automation entry automation: - alias: "Off on Remote" - trigger: + triggers: platform: event event_type: ir_command_received event_data: button_name: KEY_0 - action: + actions: action: homeassistant.turn_off target: entity_id: group.a_lights diff --git a/source/_integrations/litejet.markdown b/source/_integrations/litejet.markdown index bc94e8acf56..a878d875e67 100644 --- a/source/_integrations/litejet.markdown +++ b/source/_integrations/litejet.markdown @@ -43,7 +43,7 @@ The trigger will activate at the earliest moment both `held_more_than` and `held ```yaml automation: -- trigger: +- triggers: platform: litejet number: 55 held_more_than: diff --git a/source/_integrations/lock.markdown b/source/_integrations/lock.markdown index c87e011e1ec..7116ff7c587 100644 --- a/source/_integrations/lock.markdown +++ b/source/_integrations/lock.markdown @@ -46,7 +46,7 @@ Lock your door, the attribute should appear under a 'data' attribute for the act #### Example ```yaml -action: +actions: action: lock.lock target: entity_id: lock.my_place @@ -63,7 +63,7 @@ Unlock your door, the attribute should appear under a 'data' attribute for the a #### Example ```yaml -action: +actions: action: lock.unlock target: entity_id: lock.my_place diff --git a/source/_integrations/lutron.markdown b/source/_integrations/lutron.markdown index 86bde3b589f..5d4a13a0c29 100644 --- a/source/_integrations/lutron.markdown +++ b/source/_integrations/lutron.markdown @@ -74,13 +74,13 @@ Any configured Powr Savr occupancy sensors will be added as occupancy binary sen ``` yaml - alias: "keypad button pressed notification" - trigger: + triggers: - platform: event event_type: lutron_event event_data: id: office_pico_on action: single - action: + actions: - action: notify.telegram data: message: "pico just turned on!" diff --git a/source/_integrations/mailgun.markdown b/source/_integrations/mailgun.markdown index 587a4d71b6b..177a96c5bca 100644 --- a/source/_integrations/mailgun.markdown +++ b/source/_integrations/mailgun.markdown @@ -53,12 +53,12 @@ You can then consume that information with the following automation: ```yaml automation: - trigger: + triggers: platform: event event_type: mailgun_message_received event_data: action: call_service - action: + actions: action: light.turn_on target: entity_id: light.office @@ -102,10 +102,10 @@ The following automation reacts to an event by sending out an email with two att ```yaml # Example automation using Mailgun notifications automation: - trigger: + triggers: platform: event event_type: SPECIAL_EVENT - action: + actions: action: notify.mailgun data: title: "Something special has happened" diff --git a/source/_integrations/manual.markdown b/source/_integrations/manual.markdown index e08e4c85ac3..b7b3374820b 100644 --- a/source/_integrations/manual.markdown +++ b/source/_integrations/manual.markdown @@ -175,7 +175,7 @@ Using sensors to trigger the alarm. ```yaml automation: - alias: 'Trigger alarm while armed away' - trigger: + triggers: - platform: state entity_id: sensor.pir1 to: "active" @@ -188,11 +188,11 @@ automation: - platform: state entity_id: sensor.window to: "open" - condition: + conditions: - condition: state entity_id: alarm_control_panel.home_alarm state: armed_away - action: + actions: action: alarm_control_panel.alarm_trigger target: entity_id: alarm_control_panel.home_alarm @@ -203,11 +203,11 @@ Sending a notification when the alarm is triggered. ```yaml automation: - alias: 'Send notification when alarm triggered' - trigger: + triggers: - platform: state entity_id: alarm_control_panel.home_alarm to: "triggered" - action: + actions: - action: notify.notify data: message: "ALARM! The alarm has been triggered" @@ -218,12 +218,12 @@ Disarming the alarm when the door is properly unlocked. ```yaml automation: - alias: 'Disarm alarm when door unlocked by keypad' - trigger: + triggers: - platform: state entity_id: sensor.front_door_lock_alarm_type to: "19" # many z-wave locks use Alarm Type 19 for 'Unlocked by Keypad' - action: + actions: - action: alarm_control_panel.alarm_disarm target: entity_id: alarm_control_panel.home_alarm @@ -235,11 +235,11 @@ Sending a Notification when the Alarm is Armed (Away/Home), Disarmed and in Pend ```yaml - alias: 'Send notification when alarm is Disarmed' - trigger: + triggers: - platform: state entity_id: alarm_control_panel.home_alarm to: "disarmed" - action: + actions: - action: notify.notify data: message: "ALARM! The alarm is Disarmed at {{ states('sensor.date_time') }}" @@ -247,11 +247,11 @@ Sending a Notification when the Alarm is Armed (Away/Home), Disarmed and in Pend ```yaml - alias: 'Send notification when alarm is in pending status' - trigger: + triggers: - platform: state entity_id: alarm_control_panel.home_alarm to: "pending" - action: + actions: - action: notify.notify data: message: "ALARM! The alarm is in pending status at {{ states('sensor.date_time') }}" @@ -259,11 +259,11 @@ Sending a Notification when the Alarm is Armed (Away/Home), Disarmed and in Pend ```yaml - alias: 'Send notification when alarm is Armed in Away mode' - trigger: + triggers: - platform: state entity_id: alarm_control_panel.home_alarm to: "armed_away" - action: + actions: - action: notify.notify data: message: "ALARM! The alarm is armed in Away mode {{ states('sensor.date_time') }}" @@ -271,11 +271,11 @@ Sending a Notification when the Alarm is Armed (Away/Home), Disarmed and in Pend ```yaml - alias: 'Send notification when alarm is Armed in Home mode' - trigger: + triggers: - platform: state entity_id: alarm_control_panel.home_alarm to: "armed_home" - action: + actions: - action: notify.notify data: # Using multi-line notation allows for easier quoting diff --git a/source/_integrations/matrix.markdown b/source/_integrations/matrix.markdown index 6d21fdd2b78..dad0c5be511 100644 --- a/source/_integrations/matrix.markdown +++ b/source/_integrations/matrix.markdown @@ -129,22 +129,22 @@ notify: automation: - alias: 'React to !testword' - trigger: + triggers: platform: event event_type: matrix_command event_data: command: testword - action: + actions: action: notify.matrix_notify data: message: "It looks like you wrote !testword" - alias: 'React to an introduction' - trigger: + triggers: platform: event event_type: matrix_command event_data: command: introduction - action: + actions: action: notify.matrix_notify data: message: "Hello {{trigger.event.data.args['name']}}" @@ -196,7 +196,7 @@ Supported formats are: `text` (default), and `html`. ```yaml # Example of notification as HTML -action: +actions: action: notify.matrix_notify data: message: >- @@ -211,7 +211,7 @@ It is possible to send images with notifications. To do so, add a list of paths ```yaml # Example of notification with images -action: +actions: action: notify.matrix_notify data: message: "Test with images" diff --git a/source/_integrations/mealie.markdown b/source/_integrations/mealie.markdown index e00b3dd4dc7..d189e8d7e94 100644 --- a/source/_integrations/mealie.markdown +++ b/source/_integrations/mealie.markdown @@ -132,10 +132,10 @@ Example template sensor that contains today's dinner meal plan entries: ```yaml template: - - trigger: + - triggers: - platform: time_pattern hours: /1 - action: + actions: - action: mealie.get_mealplan data: config_entry_id: YOUR_MEALIE_CONFIG_ENTITY_ID diff --git a/source/_integrations/meteoalarm.markdown b/source/_integrations/meteoalarm.markdown index ca806f6cfd4..04d39f53638 100644 --- a/source/_integrations/meteoalarm.markdown +++ b/source/_integrations/meteoalarm.markdown @@ -91,11 +91,11 @@ Example automation ```yaml automation: - alias: "Alert me about weather warnings" - trigger: + triggers: platform: state entity_id: binary_sensor.meteoalarm from: 'off' - action: + actions: - action: notify.notify data: title: "{{state_attr('binary_sensor.meteoalarm', 'headline')}}" diff --git a/source/_integrations/minio.markdown b/source/_integrations/minio.markdown index a4000de9942..c233f6d8763 100644 --- a/source/_integrations/minio.markdown +++ b/source/_integrations/minio.markdown @@ -88,12 +88,12 @@ Automations can be triggered on new files created on the Minio server using the #Automatically upload new local files automation: - alias: "Upload camera snapshot" - trigger: + triggers: platform: event event_type: folder_watcher event_data: event_type: created - action: + actions: - delay: "00:00:01" - action: minio.put data: @@ -106,12 +106,12 @@ automation: file: "{{ trigger.event.data.path }}" - alias: "Download new Minio file" - trigger: + triggers: - platform: event event_type: minio - condition: [] - action: + conditions: [] + actions: - action: minio.get data: bucket: "{{trigger.event.data.bucket}}" diff --git a/source/_integrations/modem_callerid.markdown b/source/_integrations/modem_callerid.markdown index 9f847bf5582..cac82270cb3 100644 --- a/source/_integrations/modem_callerid.markdown +++ b/source/_integrations/modem_callerid.markdown @@ -40,30 +40,30 @@ An example automation: ```yaml automation: - alias: Notify CallerID - trigger: + triggers: platform: state entity_id: sensor.phone_modem to: "callerid" - action: + actions: action: notify.notify data: message: "Call from {{ state_attr('sensor.phone_modem', 'cid_name') }} at {{ state_attr('sensor.phone_modem', 'cid_number') }} " - alias: Notify CallerID webui - trigger: + triggers: platform: state entity_id: sensor.phone_modem to: "callerid" - action: + actions: action: persistent_notification.create data: 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') }} " - alias: Say CallerID - trigger: + triggers: platform: state entity_id: sensor.phone_modem to: "callerid" - action: + actions: action: tts.google_say data: message: "Call from {{ state_attr('sensor.phone_modem', 'cid_name') }}" diff --git a/source/_integrations/motion_blinds.markdown b/source/_integrations/motion_blinds.markdown index 2da10880ab4..48f19b124e2 100644 --- a/source/_integrations/motion_blinds.markdown +++ b/source/_integrations/motion_blinds.markdown @@ -214,10 +214,10 @@ Example YAML automation for custom polling interval (every minute): ```yaml alias: Motionblinds polling automation mode: single -trigger: +triggers: - platform: time_pattern minutes: "/1" -action: +actions: - action: homeassistant.update_entity target: entity_id: cover.motion_shade diff --git a/source/_integrations/motionblinds_ble.markdown b/source/_integrations/motionblinds_ble.markdown index 867abe2d365..9c5669a1fd4 100644 --- a/source/_integrations/motionblinds_ble.markdown +++ b/source/_integrations/motionblinds_ble.markdown @@ -62,10 +62,10 @@ This can also be automated using a YAML automation. For instance, the following ```yaml alias: Motionblinds Bluetooth polling automation mode: single -trigger: +triggers: - platform: time_pattern hours: "/24" -action: +actions: - action: homeassistant.update_entity target: entity_id: cover.motion_shade diff --git a/source/_integrations/motioneye.markdown b/source/_integrations/motioneye.markdown index 000431dd4ff..a695e9d22cf 100644 --- a/source/_integrations/motioneye.markdown +++ b/source/_integrations/motioneye.markdown @@ -351,11 +351,11 @@ must be switched on for this automation to work (controllable via `switch. ```yaml - alias: "Set camera text overlay to armed" - trigger: + triggers: - platform: state entity_id: alarm_control_panel.home_alarm to: "armed_away" - action: + actions: - action: motioneye.set_text_overlay target: entity_id: camera.living_room @@ -364,11 +364,11 @@ must be switched on for this automation to work (controllable via `switch. custom_left_text: "Alarm is ARMED" - alias: "Set camera text overlay to disarmed" - trigger: + triggers: - platform: state entity_id: alarm_control_panel.home_alarm to: "disarmed" - action: + actions: - action: motioneye.set_text_overlay target: entity_id: camera.living_room @@ -385,13 +385,13 @@ An automation to cast stored movie clips to a TV as they arrive. ```yaml - alias: "Cast motionEye movie clips" - trigger: + triggers: - platform: event event_type: motioneye.file_stored event_data: # Only cast video. file_type: "8" - action: + actions: - action: media_player.play_media target: entity_id: media_player.kitchen_tv diff --git a/source/_integrations/mqtt.markdown b/source/_integrations/mqtt.markdown index ccb9af6d7c7..e70e0f3b222 100644 --- a/source/_integrations/mqtt.markdown +++ b/source/_integrations/mqtt.markdown @@ -1062,11 +1062,11 @@ Use as [`script`](/integrations/script/) in automations. ```yaml automation: alias: "Send me a message when I get home" - trigger: + triggers: platform: state entity_id: device_tracker.me to: "home" - action: + actions: action: script.notify_mqtt data: target: "me" diff --git a/source/_integrations/netatmo.markdown b/source/_integrations/netatmo.markdown index c4a0b94203f..8e9c16922d2 100644 --- a/source/_integrations/netatmo.markdown +++ b/source/_integrations/netatmo.markdown @@ -204,11 +204,11 @@ Example: # Example automation for webhooks based Netatmo events - alias: "Netatmo event example" description: "Count all events pushed by the Netatmo API" - trigger: + triggers: - event_data: {} event_type: netatmo_event platform: event - action: + actions: - data: {} entity_id: counter.event_counter action: counter.increment @@ -222,12 +222,12 @@ Example: # Example automation for Netatmo Welcome - alias: "Motion at home" description: "Motion detected at home" - trigger: + triggers: - event_type: netatmo_event platform: event event_data: type: movement - action: + actions: - data: message: > {{ trigger.event.data["data"]["message"] }} @@ -246,12 +246,12 @@ Example: # Example automation for Netatmo Presence - alias: "Motion at home" description: "Motion detected at home" - trigger: + triggers: - event_type: netatmo_event platform: event event_data: type: human # other possible types: animal, vehicle - action: + actions: - data: message: > {{ trigger.event.data["data"]["message"] }} @@ -270,7 +270,7 @@ Example: # Example automation - alias: "Door or window open or movement" description: "Notifies which door or window is open or was moved" - trigger: + triggers: - event_type: netatmo_event platform: event event_data: @@ -283,7 +283,7 @@ Example: platform: event event_data: type: tag_small_move - action: + actions: - data: message: > {{ trigger.event.data["data"]["message"] }} diff --git a/source/_integrations/netgear_lte.markdown b/source/_integrations/netgear_lte.markdown index 1742878da29..7ae95d1ef9e 100644 --- a/source/_integrations/netgear_lte.markdown +++ b/source/_integrations/netgear_lte.markdown @@ -98,10 +98,10 @@ The following automation example processes incoming SMS messages with the [Conve ```yaml automation: - alias: "SMS conversation" - trigger: + triggers: - platform: event event_type: netgear_lte_sms - action: + actions: - action: conversation.process data: text: "{{ trigger.event.data.message }}" diff --git a/source/_integrations/nightscout.markdown b/source/_integrations/nightscout.markdown index f4b32b5aec7..19af8fb9c43 100644 --- a/source/_integrations/nightscout.markdown +++ b/source/_integrations/nightscout.markdown @@ -34,15 +34,15 @@ The state is the last reading from Nightscout, and you can see other information - id: "1234567890123" alias: "overnight_low_kitchen_lights" description: Turn on the lights in the kitchen if my blood sugar drops low overnight - trigger: + triggers: - platform: numeric_state entity_id: sensor.blood_glucose below: "65" - condition: + conditions: - condition: time after: "22:00:00" before: "06:00:00" - action: + actions: - action: light.turn_on target: entity_id: light.kitchen diff --git a/source/_integrations/nissan_leaf.markdown b/source/_integrations/nissan_leaf.markdown index d9238a1aff1..570e1c36aa4 100644 --- a/source/_integrations/nissan_leaf.markdown +++ b/source/_integrations/nissan_leaf.markdown @@ -112,14 +112,14 @@ You can also use the `nissan_leaf.update` action to request an on-demand update. - id: update_when_driver_not_home alias: "Update when driver not home" initial_state: on - trigger: + triggers: - platform: time_pattern minutes: "/30" - condition: + conditions: - condition: state entity_id: device_tracker.drivername # replace state: "not_home" - action: + actions: - action: nissan_leaf.update data: vin: "1HGBH41JXMN109186" # replace diff --git a/source/_integrations/notify.markdown b/source/_integrations/notify.markdown index 7264b8c0c73..b8be4c5cde0 100644 --- a/source/_integrations/notify.markdown +++ b/source/_integrations/notify.markdown @@ -96,7 +96,7 @@ The notify integration supports specifying [templates](/docs/configuration/templ {% raw %} ```yaml -action: +actions: action: notify.send_message data: entity_id: notify.my_direct_message_notifier @@ -126,7 +126,7 @@ The notify integration supports specifying [templates](/docs/configuration/templ {% raw %} ```yaml -action: +actions: action: notify.persistent_notification data: message: "You have {{ states('todo.shopping_list') }} items on your shopping list." @@ -137,7 +137,7 @@ action: {% raw %} ```yaml -action: +actions: action: notify.persistent_notification data: message: "The sun is {% if is_state('sun.sun', 'above_horizon') %}up{% else %}down{% endif %}!" diff --git a/source/_integrations/nzbget.markdown b/source/_integrations/nzbget.markdown index fd24cbcea7d..52371704bf0 100644 --- a/source/_integrations/nzbget.markdown +++ b/source/_integrations/nzbget.markdown @@ -51,12 +51,12 @@ Example automation to send a Telegram message on a completed download: ```yaml - alias: "Completed Torrent" - trigger: + triggers: platform: event event_type: nzbget_download_complete - event_data: category: tv - action: + actions: action: notify.telegram_notifier data: title: "Download completed!" diff --git a/source/_integrations/openai_conversation.markdown b/source/_integrations/openai_conversation.markdown index 18ccd9e23d7..b2a633d35fd 100644 --- a/source/_integrations/openai_conversation.markdown +++ b/source/_integrations/openai_conversation.markdown @@ -129,10 +129,10 @@ Select **YAML Mode** to reveal the *config_entry* value to be used in the below ```yaml automation: - alias: "Update image when weather changes" - trigger: + triggers: - platform: state entity_id: weather.home - action: + actions: - alias: "Ask OpenAI to generate an image" action: openai_conversation.generate_image response_variable: generated_image @@ -148,7 +148,7 @@ automation: url: '{{ generated_image.url }}' template: - - trigger: + - triggers: alias: "Update image when a new weather image is generated" platform: event event_type: new_weather_image diff --git a/source/_integrations/openhome.markdown b/source/_integrations/openhome.markdown index fee7af0c224..bc358bb377a 100644 --- a/source/_integrations/openhome.markdown +++ b/source/_integrations/openhome.markdown @@ -24,7 +24,7 @@ The Linn / OpenHome integration allows you to connect an [Openhome Compliant Ren ### Example local audio playback action ```yaml -action: +actions: - action: media_player.play_media target: entity_id: media_player.linn_bedroom diff --git a/source/_integrations/opensky.markdown b/source/_integrations/opensky.markdown index d5d52773fff..54e0b1d1003 100644 --- a/source/_integrations/opensky.markdown +++ b/source/_integrations/opensky.markdown @@ -59,10 +59,10 @@ To receive notifications of the entering flights using the [Home Assistant Compa ```yaml automation: - alias: "Flight entry notification" - trigger: + triggers: platform: event event_type: opensky_entry - action: + actions: action: notify.mobile_app_ data: message: "Flight entry of {{ trigger.event.data.callsign }}" @@ -76,10 +76,10 @@ One can also get a direct link to the OpenSky website to see the flight using th ```yaml automation: - alias: "Flight entry notification" - trigger: + triggers: platform: event event_type: opensky_entry - action: + actions: action: notify.mobile_app_ data: message: "Flight entry of {{ trigger.event.data.callsign }}" diff --git a/source/_integrations/openuv.markdown b/source/_integrations/openuv.markdown index 34e8dc8ac21..6625b2d486e 100644 --- a/source/_integrations/openuv.markdown +++ b/source/_integrations/openuv.markdown @@ -101,15 +101,15 @@ horizon: ```yaml automation: - alias: "Update OpenUV" - trigger: + triggers: platform: time_pattern minutes: "/20" - condition: + conditions: condition: numeric_state entity_id: sun.sun value_template: "{{ state.attributes.elevation }}" above: 10 - action: + actions: action: homeassistant.update_entity target: entity_id: sensor.LATITUDE_LONGITUDE_current_uv_index @@ -121,10 +121,10 @@ Update the protection window once a day at 12:00pm: ```yaml automation: - alias: "Update OpenUV" - trigger: + triggers: platform: time at: "12:00:00" - action: + actions: action: homeassistant.update_entity target: entity_id: binary_sensor.LATITUDE_LONGITUDE_protection_window @@ -139,13 +139,13 @@ running into the 50 API call limit per day: ```yaml automation: - alias: "Update OpenUV" - trigger: + triggers: # Time pattern of /45 will not work as expected, as it will sometimes be true # twice per hour (on the whole hour and on the whole hour + 45 minutes); use a # more frequent time pattern and a condition to get the intended behavior: - platform: time_pattern minutes: "/15" - condition: + conditions: - condition: sun after: sunrise before: sunset @@ -164,7 +164,7 @@ automation: now() - state_attr('automation.update_openuv', 'last_triggered') ) >= timedelta(hours = 0, minutes = 40) }} - action: + actions: action: homeassistant.update_entity target: entity_id: diff --git a/source/_integrations/persistent_notification.markdown b/source/_integrations/persistent_notification.markdown index e34273ffe3c..a205fab06ab 100644 --- a/source/_integrations/persistent_notification.markdown +++ b/source/_integrations/persistent_notification.markdown @@ -30,7 +30,7 @@ An example of a persistent notification trigger in YAML: ```yaml automation: - - trigger: + - triggers: - platform: persistent_notification # Optional. Possible values: added, removed, updated, current update_type: @@ -56,7 +56,7 @@ The `persistent_notification.create` action takes in `message`, `title`, and `no Here is how an [action](/docs/automation/action) of your [automation setup](/getting-started/automation/) with static content could look like. ```yaml -action: +actions: action: persistent_notification.create data: message: "Your message goes here" @@ -68,7 +68,7 @@ If you want to show some runtime information, you have to use [templates](/docs/ {% raw %} ```yaml -action: +actions: action: persistent_notification.create data: title: > @@ -87,7 +87,7 @@ The `persistent_notification.dismiss` action requires a `notification_id`. This action allows you to remove a notifications by script or automation. ```yaml -action: +actions: action: persistent_notification.dismiss data: notification_id: "1234" @@ -96,7 +96,7 @@ action: The `persistent_notification.dismiss_all` action allows you to remove all notifications. ```yaml -action: +actions: action: persistent_notification.dismiss_all ``` diff --git a/source/_integrations/plex.markdown b/source/_integrations/plex.markdown index 8951117cd3a..4e6e81e2478 100644 --- a/source/_integrations/plex.markdown +++ b/source/_integrations/plex.markdown @@ -78,7 +78,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: ```yaml alias: Plex - New media added -trigger: +triggers: - platform: state entity_id: sensor.plex_library_movies id: movie @@ -89,7 +89,7 @@ trigger: entity_id: sensor.plex_library_tv_shows id: episode -action: +actions: - action: notify.mobile_app_phone data: title: "New {{ trigger.id }} added" diff --git a/source/_integrations/point.markdown b/source/_integrations/point.markdown index aa8baf5dc3d..ab9caecd3fe 100644 --- a/source/_integrations/point.markdown +++ b/source/_integrations/point.markdown @@ -95,11 +95,11 @@ The following example show how to implement an automation for the **button_press # Example configuration.yaml Automation entry automation: alias: "Point button press" - trigger: + triggers: - platform: state entity_id: binary_sensor.point_button_press # Change this accordingly to: "on" - action: + actions: - action: persistent_notification.create data: title: Point button press @@ -116,14 +116,14 @@ The events shown as [binary sensors](#binary-sensor) are sent to Home Assistant # Example configuration.yaml Automation entry automation: alias: "Point button press (webhook)" - trigger: + triggers: - platform: event event_type: point_webhook_received event_data: {} - condition: + conditions: condition: template value_template: "{{ trigger.event.data.event.type == 'short_button_press' }}" - action: + actions: - action: persistent_notification.create data: title: Point button press (webhook) diff --git a/source/_integrations/pushbullet.markdown b/source/_integrations/pushbullet.markdown index a70dc87eb0a..ca96d2eab62 100644 --- a/source/_integrations/pushbullet.markdown +++ b/source/_integrations/pushbullet.markdown @@ -85,7 +85,7 @@ To use notifications, please see the [getting started with automation page](/get ### URL support ```yaml -action: +actions: action: notify.NOTIFIER_NAME data: title: Send URL @@ -99,7 +99,7 @@ action: ### File support ```yaml -action: +actions: action: notify.NOTIFIER_NAME data: title: Send file @@ -113,7 +113,7 @@ action: ### File URL support ```yaml -action: +actions: action: notify.NOTIFIER_NAME data: title: Send file @@ -127,7 +127,7 @@ action: ### Single target ```yaml - action: + actions: action: notify.NOTIFIER_NAME data: title: "Send to one device" diff --git a/source/_integrations/pushsafer.markdown b/source/_integrations/pushsafer.markdown index 4e487d4ca4d..e9013555cf4 100644 --- a/source/_integrations/pushsafer.markdown +++ b/source/_integrations/pushsafer.markdown @@ -46,7 +46,7 @@ private_key: Message to two devices with formatted text. ```yaml -action: +actions: action: notify.notify data: title: "Test to 2 devices" @@ -64,7 +64,7 @@ action: Message to one device with formatted text and image from an external URL. ```yaml -action: +actions: action: notify.notify data: title: "Test to 1 device with image from an url" @@ -84,7 +84,7 @@ action: Message to two devices and one device group with formatted text and local image. ```yaml -action: +actions: action: notify.notify data: title: "Test to 3 devices with local image" diff --git a/source/_integrations/qrcode.markdown b/source/_integrations/qrcode.markdown index 06bf10229a5..5ef7eeb5d29 100644 --- a/source/_integrations/qrcode.markdown +++ b/source/_integrations/qrcode.markdown @@ -52,11 +52,11 @@ An automation using this integration could look like this: ```yaml automation: - alias: "Catch QR code and arm the alarm system" - trigger: + triggers: - platform: state entity_id: image_processing.qr_front_door to: ARM_QR_CODE_VALUE - action: + actions: - action: alarm_control_panel.alarm_arm_away target: entity_id: alarm_control_panel.home_alarm diff --git a/source/_integrations/qwikswitch.markdown b/source/_integrations/qwikswitch.markdown index 20b747f0cf5..d00e92d2a98 100644 --- a/source/_integrations/qwikswitch.markdown +++ b/source/_integrations/qwikswitch.markdown @@ -108,7 +108,7 @@ QwikSwitch devices (i.e., transmitter buttons) will fire events on the Home Assi ```yaml automation: - alias: "Action - Respond to A button press" - trigger: + triggers: platform: event event_type: qwikswitch.button.@12df34 ``` diff --git a/source/_integrations/rainbird.markdown b/source/_integrations/rainbird.markdown index 5c27d954d28..f6c8f400f51 100644 --- a/source/_integrations/rainbird.markdown +++ b/source/_integrations/rainbird.markdown @@ -76,10 +76,10 @@ zone switch entity and allows a custom duration unlike the switch. # Example configuration.yaml automation entry automation: - alias: "Turn irrigation on" - trigger: + triggers: - platform: time at: "5:30:00" - action: + actions: - action: rainbird.start_irrigation data: entity_id: switch.rain_bird_sprinkler_1 diff --git a/source/_integrations/recorder.markdown b/source/_integrations/recorder.markdown index c5005deb89d..cffa148f034 100644 --- a/source/_integrations/recorder.markdown +++ b/source/_integrations/recorder.markdown @@ -235,10 +235,10 @@ The below automation will remove history for `sensor.power_sensor_0` older than ```yaml alias: "Purge noisy power sensors" -trigger: +triggers: - platform: time at: "04:15:00" -action: +actions: - action: recorder.purge_entities data: keep_days: 5 diff --git a/source/_integrations/remember_the_milk.markdown b/source/_integrations/remember_the_milk.markdown index cceed187284..e4e2a4ab2a0 100644 --- a/source/_integrations/remember_the_milk.markdown +++ b/source/_integrations/remember_the_milk.markdown @@ -92,21 +92,21 @@ Here's an example for an automation that creates a new task whenever `sensor.mys ```yaml - id: mysensor_on - trigger: + triggers: platform: state entity_id: sensor.mysensor to: on - action: + actions: - action: remember_the_milk.myaccount_create_task data: name: "Please switch off {{trigger.entity_id}}" id: "{{trigger.entity_id}}" - id: mysensor_off - trigger: + triggers: platform: state entity_id: sensor.mysensor to: off - action: + actions: - action: remember_the_milk.myaccount_complete_task data: id: "{{trigger.entity_id}}" diff --git a/source/_integrations/rest_command.markdown b/source/_integrations/rest_command.markdown index ec57ba55fa0..b6a6d50b185 100644 --- a/source/_integrations/rest_command.markdown +++ b/source/_integrations/rest_command.markdown @@ -105,9 +105,9 @@ The following example shows how the REST command response may be used in automat # Create a ToDo notification based on file contents automation: - alias: "Check API response" - trigger: + triggers: - ... - action: + actions: - action: rest_command.traefik_get_rawdata response_variable: traefik_response - if: "{{ traefik_response['status'] == 200 }}" @@ -183,12 +183,12 @@ Call the new action from [developer tools](/docs/tools/dev-tools/) in the sideba ```yaml automation: - alias: "Arrive at Work" - trigger: + triggers: platform: zone entity_id: device_tracker.my_device zone: zone.work event: enter - action: + actions: - action: rest_command.my_request data: status: "At Work" diff --git a/source/_integrations/rfxtrx.markdown b/source/_integrations/rfxtrx.markdown index 08115f65dfc..3564ba37376 100644 --- a/source/_integrations/rfxtrx.markdown +++ b/source/_integrations/rfxtrx.markdown @@ -320,7 +320,7 @@ scene: automation: - alias: "Use doorbell button to trigger scene" - trigger: + triggers: - platform: event event_type: rfxtrx_event event_data: @@ -329,7 +329,7 @@ automation: id_string: "00:90" values: Sound: 9 - action: + actions: action: scene.turn_on target: entity_id: scene.welcomescene @@ -345,7 +345,7 @@ Simulate a button being pressed: ```yaml ... -action: +actions: action: rfxtrx.send data: event: 0b1111e003af16aa10000060 diff --git a/source/_integrations/ring.markdown b/source/_integrations/ring.markdown index 53f3b49e0d0..0e6f3ad86d6 100644 --- a/source/_integrations/ring.markdown +++ b/source/_integrations/ring.markdown @@ -86,11 +86,11 @@ Then you can use the following automation, with the entities from your system, w ```yaml automation: alias: "Save the video when the doorbell is pushed" - trigger: + triggers: - platform: state entity_id: binary_sensor.front_doorbell_ding to: "on" - action: + actions: - action: downloader.download_file data: url: "{{ state_attr('camera.front_door', 'video_url') }}" diff --git a/source/_integrations/roku.markdown b/source/_integrations/roku.markdown index 8e14ff2a99d..a28d924506d 100644 --- a/source/_integrations/roku.markdown +++ b/source/_integrations/roku.markdown @@ -105,7 +105,7 @@ The `media_player.select_source` action may be used to launch specific applicati ### Examples ```yaml -action: +actions: - action: media_player.select_source target: entity_id: media_player.roku @@ -116,7 +116,7 @@ action: Alternatively, the application id can be used for `source`. See [Obtaining Application IDs](#obtaining-application-ids). ```yaml -action: +actions: - action: media_player.select_source target: entity_id: media_player.roku @@ -143,7 +143,7 @@ The `media_player.play_media` action may be used to tune to specific channels on ### Example ```yaml -action: +actions: - action: media_player.play_media target: entity_id: media_player.roku @@ -167,7 +167,7 @@ The `media_player.play_media` action may be used to deep-link to content within ### Example ```yaml -action: +actions: - action: media_player.play_media target: entity_id: media_player.roku diff --git a/source/_integrations/roon.markdown b/source/_integrations/roon.markdown index e01713f85e7..82865ca9f0c 100644 --- a/source/_integrations/roon.markdown +++ b/source/_integrations/roon.markdown @@ -78,11 +78,11 @@ Here is an example automation using an IR blaster to control `media_player_study ```yaml alias: Roon Study Volume description: "" -trigger: +triggers: - platform: state entity_id: - event.study_roon_volume -action: +actions: - choose: - conditions: - condition: state diff --git a/source/_integrations/samsungtv.markdown b/source/_integrations/samsungtv.markdown index 9d3f2590afb..c394485df68 100644 --- a/source/_integrations/samsungtv.markdown +++ b/source/_integrations/samsungtv.markdown @@ -38,10 +38,10 @@ wake_on_lan: # enables `wake_on_lan` integration automation: - alias: "Turn On Living Room TV with WakeOnLan" - trigger: + triggers: - platform: samsungtv.turn_on entity_id: media_player.samsung_smart_tv - action: + actions: - action: wake_on_lan.send_magic_packet data: mac: aa:bb:cc:dd:ee:ff diff --git a/source/_integrations/satel_integra.markdown b/source/_integrations/satel_integra.markdown index 22405a95207..9161d6a2244 100644 --- a/source/_integrations/satel_integra.markdown +++ b/source/_integrations/satel_integra.markdown @@ -172,11 +172,11 @@ For example: ```yaml alias: "Flick the input switch when movement in bedroom detected" - trigger: + triggers: platform: state entity_id: "binary_sensor.bedroom" to: "on" - action: + actions: action: input_boolean.turn_on target: entity_id: input_boolean.movement_detected diff --git a/source/_integrations/scene.markdown b/source/_integrations/scene.markdown index 9351a06369e..6fe2a7912eb 100644 --- a/source/_integrations/scene.markdown +++ b/source/_integrations/scene.markdown @@ -101,12 +101,12 @@ Scenes can be activated using the `scene.turn_on` action (there is no `scene.tur ```yaml # Example automation automation: - trigger: + triggers: platform: state entity_id: device_tracker.sweetheart from: "not_home" to: "home" - action: + actions: action: scene.turn_on target: entity_id: scene.romantic @@ -119,12 +119,12 @@ With the `scene.apply` action you are able to apply a scene without first defini ```yaml # Example automation automation: - trigger: + triggers: platform: state entity_id: device_tracker.sweetheart from: "not_home" to: "home" - action: + actions: action: scene.apply data: entities: @@ -148,12 +148,12 @@ light will transition to the scene in 2.5 seconds. ```yaml # Example automation automation: - trigger: + triggers: platform: state entity_id: device_tracker.sweetheart from: "not_home" to: "home" - action: + actions: action: scene.turn_on target: entity_id: scene.romantic @@ -185,10 +185,10 @@ This video tutorial explains how scenes work and how you can utilize scenes on t ```yaml # Example automation using entities automation: - trigger: + triggers: platform: homeassistant event: start - action: + actions: action: scene.create data: scene_id: my_scene @@ -213,11 +213,11 @@ If the scene was not previously created by `scene.create`, the action will fail ```yaml # Example automation automation: - trigger: + triggers: platform: state entity_id: sun.sun to: below_horizon - action: + actions: - action: scene.delete data: entity_id: scene.my_scene @@ -228,13 +228,13 @@ The following example turns off some entities as soon as a window opens. The sta ```yaml # Example automation using snapshot - alias: "Window opened" - trigger: + triggers: - platform: state entity_id: binary_sensor.window from: "off" to: "on" - condition: [] - action: + conditions: [] + actions: - action: scene.create data: scene_id: before @@ -250,13 +250,13 @@ The following example turns off some entities as soon as a window opens. The sta data: hvac_mode: "off" - alias: "Window closed" - trigger: + triggers: - platform: state entity_id: binary_sensor.window from: "on" to: "off" - condition: [] - action: + conditions: [] + actions: - action: scene.turn_on target: entity_id: scene.before diff --git a/source/_integrations/schedule.markdown b/source/_integrations/schedule.markdown index 2102cbe54ba..f666cd3394e 100644 --- a/source/_integrations/schedule.markdown +++ b/source/_integrations/schedule.markdown @@ -149,12 +149,12 @@ automations and templates. A schedule creates an on/off (schedule) sensor within the times set. Using the thermostat schedule example above, you can turn on your thermostat: ```yaml -trigger: +triggers: - platform: state entity_id: - schedule.thermostat_schedule to: "on" - action: + actions: - action: climate.turn_on target: entity_id: climate.thermostat @@ -165,12 +165,12 @@ Using the `light_schedule` example from above in an automation might look like t {% raw %} ```yaml -trigger: +triggers: - platform: state entity_id: - schedule.light_schedule to: "on" - action: + actions: - service: light.turn_on target: entity_id: climate.thermostat diff --git a/source/_integrations/script.markdown b/source/_integrations/script.markdown index a144d685bd4..d365dabd205 100644 --- a/source/_integrations/script.markdown +++ b/source/_integrations/script.markdown @@ -176,12 +176,12 @@ Aside from the automation editor UI, variables can be passed to scripts within t ```yaml # Example configuration.yaml entry automation: - trigger: + triggers: platform: state entity_id: light.bedroom from: "off" to: "on" - action: + actions: action: script.notify_pushover data: title: "State change" @@ -195,12 +195,12 @@ This example shows using `script.turn_on` action: ```yaml # Example configuration.yaml entry automation: - trigger: + triggers: platform: state entity_id: light.bedroom from: "off" to: "on" - action: + actions: action: script.turn_on target: entity_id: script.notify_pushover diff --git a/source/_integrations/shell_command.markdown b/source/_integrations/shell_command.markdown index 7f08be4eeba..e8ce442d035 100644 --- a/source/_integrations/shell_command.markdown +++ b/source/_integrations/shell_command.markdown @@ -82,10 +82,10 @@ helper and an automation. # Apply value of a GUI slider to the shell_command automation: - alias: "run_set_ac" - trigger: + triggers: platform: state entity_id: input_number.ac_temperature - action: + actions: action: shell_command.set_ac_to_slider input_number: @@ -110,9 +110,9 @@ The following example shows how the shell command response may be used in automa # Create a ToDo notification based on file contents automation: - alias: "run_set_ac" - trigger: + triggers: - ... - action: + actions: - action: shell_command.get_file_contents data: filename: "todo.txt" diff --git a/source/_integrations/shelly.markdown b/source/_integrations/shelly.markdown index f15d05d2f72..7dd98efa26d 100644 --- a/source/_integrations/shelly.markdown +++ b/source/_integrations/shelly.markdown @@ -199,27 +199,27 @@ You can also create automations using YAML, for example: ```yaml - alias: "Toggle living room light" - trigger: + triggers: platform: event event_type: shelly.click event_data: device: shellyswitch25-AABBCC channel: 1 click_type: single - action: + actions: action: light.toggle target: entity_id: light.living_room - alias: "Toggle living room lamp" - trigger: + triggers: platform: event event_type: shelly.click event_data: device: shellyswitch25-AABBCC channel: 2 click_type: long - action: + actions: action: light.toggle target: entity_id: light.lamp_living_room diff --git a/source/_integrations/shopping_list.markdown b/source/_integrations/shopping_list.markdown index fcaec3d8239..36dfa1363d3 100644 --- a/source/_integrations/shopping_list.markdown +++ b/source/_integrations/shopping_list.markdown @@ -92,12 +92,12 @@ A `shopping_list_updated` event is triggered when items in the list are modified ```yaml alias: "Notify on new shopping list item" -trigger: +triggers: - platform: event event_type: shopping_list_updated event_data: action: "add" -action: +actions: - action: notify.notify data: message: "{{ trigger.event.data.item.name }} has been added to the shopping list" diff --git a/source/_integrations/sighthound.markdown b/source/_integrations/sighthound.markdown index e51ced31dea..2cb5da17261 100644 --- a/source/_integrations/sighthound.markdown +++ b/source/_integrations/sighthound.markdown @@ -86,13 +86,13 @@ An example using two automations: - id: "SOME_UNIQUE_ID" alias: "Entrance Motion Image Processing" description: "Send a camera image to sighthound, when motion is detected at the entrance" - trigger: + triggers: - type: motion platform: device device_id: YOUR_DEVICE_ID entity_id: binary_sensor.my_motion_sensor domain: binary_sensor - action: + actions: - action: image_processing.scan target: entity_id: image_processing.sighthound_my_cam @@ -101,10 +101,10 @@ An example using two automations: - id: "ANOTHER_UNIQUE_ID" alias: "Arriving Vehicle Notification" description: "Send a notification to a phone, when a vehicle is detected at the entrance" - trigger: + triggers: - platform: event event_type: sighthound.vehicle_detected - action: + actions: - action: notify.mobile_app_my_iphone data: message: "Somebody has just arrived by car." diff --git a/source/_integrations/signal_messenger.markdown b/source/_integrations/signal_messenger.markdown index 9a5e3ca0acb..72cc1bd854c 100644 --- a/source/_integrations/signal_messenger.markdown +++ b/source/_integrations/signal_messenger.markdown @@ -80,7 +80,7 @@ A few examples on how to use this integration to send notifications from automat ```yaml ... -action: +actions: action: notify.NOTIFIER_NAME data: message: "That's an example that sends a simple text message to the recipients specified in the configuration.yaml. If text mode is 'styled', you can use *italic*, **bold** or ~strikethrough~ ." @@ -99,7 +99,7 @@ This example assumes you have an image stored in the default `www`-folder in Hom ```yaml ... -action: +actions: action: notify.NOTIFIER_NAME data: message: "Alarm in the living room!" @@ -118,7 +118,7 @@ action: ```yaml ... -action: +actions: action: notify.NOTIFIER_NAME data: message: "Person detected on Front Camera!" @@ -163,13 +163,13 @@ You can create an automation as follows: ```yaml ... -trigger: +triggers: - platform: state entity_id: - sensor.signal_message_received attribute: source to: "" -action: +actions: - action: notify.signal data: message: "Message received!" diff --git a/source/_integrations/simplisafe.markdown b/source/_integrations/simplisafe.markdown index 89b1de506a5..0d47eaef1c2 100644 --- a/source/_integrations/simplisafe.markdown +++ b/source/_integrations/simplisafe.markdown @@ -146,7 +146,7 @@ as an event trigger, with `last_event_type` as the `event_data`. For example, the following will trigger when the doorbell rings: ```yaml -trigger: +triggers: - platform: event event_type: SIMPLISAFE_EVENT event_data: diff --git a/source/_integrations/sms.markdown b/source/_integrations/sms.markdown index 426c8ca4f7f..308f5d72390 100644 --- a/source/_integrations/sms.markdown +++ b/source/_integrations/sms.markdown @@ -33,7 +33,7 @@ To use notifications, please see the [getting started with automation page](/get ### Send message ```yaml -action: +actions: action: notify.sms data: message: "This is a message for you!" @@ -45,7 +45,7 @@ action: Some devices (receiving or sending) do not support Unicode (the default encoding). For these you can disable Unicode: ```yaml -action: +actions: action: notify.sms data: message: "This is a message for you in ANSI" @@ -97,10 +97,10 @@ notify_sms_user1: ```yaml - alias: "Forward SMS" - trigger: + triggers: - platform: event event_type: sms.incoming_sms - action: + actions: - action: script.notify_sms_user1 data: message: | diff --git a/source/_integrations/smtp.markdown b/source/_integrations/smtp.markdown index 5c5e5014c1f..ceab1dfbb29 100644 --- a/source/_integrations/smtp.markdown +++ b/source/_integrations/smtp.markdown @@ -91,11 +91,11 @@ A notify integration will be created using the name without spaces. In the above ```yaml - alias: "Send E-Mail Every Morning" description: "" - trigger: + triggers: - platform: time at: "08:00:00" - condition: [] - action: + conditions: [] + actions: - action: notify.NOTIFIER_NAME data: title: "Good Morning" diff --git a/source/_integrations/snips.markdown b/source/_integrations/snips.markdown index 38ebf9bb250..79f606f7ee4 100644 --- a/source/_integrations/snips.markdown +++ b/source/_integrations/snips.markdown @@ -247,7 +247,7 @@ Here is a more complex example. The automation is triggered if the garage door i ```yaml automation: garage_door_has_been_open: - trigger: + triggers: - platform: state entity_id: binary_sensor.my_garage_door_sensor from: "off" @@ -267,7 +267,7 @@ intent_script: speech: type: plain text: "OK, closing the garage door" - action: + actions: - action: script.garage_door_close ``` diff --git a/source/_integrations/snooz.markdown b/source/_integrations/snooz.markdown index 2308d522131..06a2781a15b 100644 --- a/source/_integrations/snooz.markdown +++ b/source/_integrations/snooz.markdown @@ -67,10 +67,10 @@ Transition the volume level over the specified duration. If the device is powere ```yaml automation: - - trigger: + - triggers: - platform: time at: "04:20:00" - action: + actions: - action: snooz.transition_on target: entity_id: fan.snooz_abcd @@ -97,10 +97,10 @@ Once the transition completes, the volume level is restored to the value before ```yaml automation: - - trigger: + - triggers: - platform: time at: "16:20:00" - action: + actions: - action: snooz.transition_off target: entity_id: fan.snooz_abcd diff --git a/source/_integrations/sonos.markdown b/source/_integrations/sonos.markdown index 5a5e439eea0..c71e4e5c2b5 100644 --- a/source/_integrations/sonos.markdown +++ b/source/_integrations/sonos.markdown @@ -397,14 +397,14 @@ Removes an item from the queue. # Example automation to remove just played song from queue alias: "Remove last played song from queue" id: Remove last played song from queue -trigger: +triggers: - platform: state entity_id: media_player.kitchen - platform: state entity_id: media_player.bathroom - platform: state entity_id: media_player.move -condition: +conditions: condition: and conditions: # Coordinator @@ -419,7 +419,7 @@ condition: - condition: template value_template: > {{ trigger.from_state.attributes.queue_position < trigger.to_state.attributes.queue_position }} -action: +actions: - action: sonos.remove_from_queue target: entity_id: > diff --git a/source/_integrations/spc.markdown b/source/_integrations/spc.markdown index 12aa74aaef6..39641b648fb 100644 --- a/source/_integrations/spc.markdown +++ b/source/_integrations/spc.markdown @@ -59,10 +59,10 @@ The `changed_by` attribute enables one to be able to take different actions depe ```yaml automation: - alias: "Alarm status changed" - trigger: + triggers: - platform: state entity_id: alarm_control_panel.alarm_1 - action: + actions: - action: notify.notify data: message: > diff --git a/source/_integrations/speedtestdotnet.markdown b/source/_integrations/speedtestdotnet.markdown index 94f3b5768a6..4cce63766c3 100644 --- a/source/_integrations/speedtestdotnet.markdown +++ b/source/_integrations/speedtestdotnet.markdown @@ -50,17 +50,17 @@ In this section you will find some real-life examples of how to use this integra # Example configuration.yaml entry automation: - alias: "Internet Speed Glow Connect Great" - trigger: + triggers: - platform: template value_template: "{{ states('sensor.speedtest_download')|float >= 10 }}" - action: + actions: - action: shell_command.green - alias: "Internet Speed Glow Connect Poor" - trigger: + triggers: - platform: template value_template: "{{ states('sensor.speedtest_download')|float < 10 }}" - action: + actions: - action: shell_command.red ``` diff --git a/source/_integrations/sun.markdown b/source/_integrations/sun.markdown index e637a4d806f..69a2329388c 100644 --- a/source/_integrations/sun.markdown +++ b/source/_integrations/sun.markdown @@ -63,7 +63,7 @@ an offset. The sun trigger need to have the type 'sun', which event (sunset or sunrise) and an optional offset. ```yaml -trigger: +triggers: - platform: sun event: sunrise offset: "-01:00:01" diff --git a/source/_integrations/system_log.markdown b/source/_integrations/system_log.markdown index 7c171b7a55b..5f5dc1508c3 100644 --- a/source/_integrations/system_log.markdown +++ b/source/_integrations/system_log.markdown @@ -90,12 +90,12 @@ counter: automation: - alias: "Count warnings" - trigger: + triggers: platform: event event_type: system_log_event event_data: level: WARNING - action: + actions: action: counter.increment target: entity_id: counter.warning_counter @@ -110,13 +110,13 @@ This automation will create a persistent notification whenever an error or warni ```yaml automation: - alias: "Create notifications for 'action' errors" - trigger: + triggers: platform: event event_type: system_log_event - condition: + conditions: condition: template value_template: '{{ "action" in trigger.event.data.message[0] }}' - action: + actions: action: persistent_notification.create data: title: Something bad happened @@ -132,12 +132,12 @@ This automation will create a new log entry when the door is opened: ```yaml automation: - alias: "Log door opened" - trigger: + triggers: platform: state entity_id: binary_sensor.door from: "off" to: "on" - action: + actions: action: system_log.write data: message: "Door opened!" diff --git a/source/_integrations/tado.markdown b/source/_integrations/tado.markdown index f4f89e1a832..f7ddef4bd6f 100644 --- a/source/_integrations/tado.markdown +++ b/source/_integrations/tado.markdown @@ -115,14 +115,14 @@ script: # Example automation to set temperature offset based on another thermostat value automation: # Trigger if the state of either thermostat changes - trigger: + triggers: - platform: state entity_id: - sensor.temp_sensor_room - sensor.tado_temperature # Check if the room temp is more than 0.5 away from the tado thermostat reading condition. The sensors default to room temperature (20) when the reading is in error: - condition: + conditions: - condition: template value_template: > {% set tado_temp = states('sensor.tado_temperature')|float(20) %} @@ -130,7 +130,7 @@ automation: {{ (tado_temp - room_temp) | abs > 0.5 }} # Work out what the new offset should be (tado temp less the room temp but add the current offset value) and turn that to a negative value for setting as the new offset - action: + actions: - action: tado.set_climate_temperature_offset target: entity_id: climate.tado @@ -159,14 +159,14 @@ Examples: # Example automation add meter readings on a daily basis. automation: # Trigger on specified time. - trigger: + triggers: - platform: time at: "00:00:00" # Add meter readings from `sensor.gas_consumption` to Tado. # Retrieve your `config_entry` id by setting this automation up in UI mode. # Notice that you may have to convert the reading to integer. - action: + actions: - action: tado.add_meter_reading data: config_entry: ef2e84b3dfc0aee85ed44ac8e8038ccf diff --git a/source/_integrations/tag.markdown b/source/_integrations/tag.markdown index 18cf41220af..beb0e01934f 100644 --- a/source/_integrations/tag.markdown +++ b/source/_integrations/tag.markdown @@ -75,14 +75,14 @@ automation: 04-B1-C6-62-2F-64-80: media_content_id: spotify:playlist:0OtWh3u6fZrBJTQtVBQWge media_content_type: playlist - trigger: + triggers: platform: event event_type: tag_scanned - condition: + conditions: # Test that we support this device and tag - "{{ trigger.event.data.tag_id in tags }}" - "{{ trigger.event.data.device_id in media_players }}" - action: + actions: - variables: media_player_entity_id: "{{ media_players[trigger.event.data.device_id] }}" media_content_id: "{{ tags[trigger.event.data.tag_id].media_content_id }}" diff --git a/source/_integrations/telegram.markdown b/source/_integrations/telegram.markdown index 3b2285b24ce..2360435c9e3 100644 --- a/source/_integrations/telegram.markdown +++ b/source/_integrations/telegram.markdown @@ -176,7 +176,7 @@ To use notifications, please see the [getting started with automation page](/get ```yaml ... -action: +actions: action: notify.NOTIFIER_NAME data: title: "*Send a message*" @@ -210,7 +210,7 @@ inline_keyboard: ```yaml ... -action: +actions: action: notify.NOTIFIER_NAME data: title: Send an images @@ -286,7 +286,7 @@ homeassistant: ```yaml ... -action: +actions: action: notify.NOTIFIER_NAME data: title: Send a video @@ -347,7 +347,7 @@ inline_keyboard: ```yaml ... -action: +actions: action: notify.NOTIFIER_NAME data: title: Send a document @@ -407,7 +407,7 @@ inline_keyboard: ```yaml ... -action: +actions: action: notify.NOTIFIER_NAME data: title: Send location @@ -441,7 +441,7 @@ inline_keyboard: ```yaml ... -action: +actions: action: notify.NOTIFIER_NAME data: title: "*Send a message*" diff --git a/source/_integrations/telegram_bot.markdown b/source/_integrations/telegram_bot.markdown index a697554baba..f914244a035 100644 --- a/source/_integrations/telegram_bot.markdown +++ b/source/_integrations/telegram_bot.markdown @@ -346,12 +346,12 @@ Simple ping pong example. ```yaml alias: 'Telegram bot that reply pong to ping' -trigger: +triggers: platform: event event_type: telegram_command event_data: command: "/ping" -action: +actions: - action: notify.notify data: message: "pong" @@ -360,12 +360,12 @@ action: An example that shows keyboard interaction with `notify.telegram` ```yaml -trigger: +triggers: platform: event event_type: telegram_command event_data: command: "/start" -action: +actions: - action: notify.telegram data: message: "commands" @@ -378,12 +378,12 @@ action: and an automation to trigger a related command "/siren". ```yaml -trigger: +triggers: platform: event event_type: telegram_command event_data: command: "/siren" -action: +actions: - action: homeassistant.turn_on target: entity_id: switch.vision_zm1601eu5_battery_operated_siren_switch_9_0 @@ -400,12 +400,12 @@ An example to show the use of event_data in action: ```yaml - alias: 'Kitchen Telegram Speak' - trigger: + triggers: platform: event event_type: telegram_command event_data: command: "/speak" - action: + actions: - action: notify.kitchen_echo data: message: > @@ -428,10 +428,10 @@ Text repeater: ```yaml - alias: 'Telegram bot that repeats text' - trigger: + triggers: platform: event event_type: telegram_text - action: + actions: - action: telegram_bot.send_message data: title: "*Dumb automation*" @@ -451,12 +451,12 @@ Message editor: ```yaml - alias: 'Telegram bot that edits the last sent message' - trigger: + triggers: platform: event event_type: telegram_callback event_data: command: "/edit_msg" - action: + actions: - action: telegram_bot.answer_callback_query data: callback_query_id: "{{ trigger.event.data.id }}" @@ -484,12 +484,12 @@ Keyboard editor: ```yaml - alias: 'Telegram bot that edits the keyboard' - trigger: + triggers: platform: event event_type: telegram_callback event_data: command: "/remove_button" - action: + actions: - action: telegram_bot.answer_callback_query data: callback_query_id: "{{ trigger.event.data.id }}" @@ -510,12 +510,12 @@ Only acknowledges the 'NO' answer: ```yaml - alias: 'Telegram bot that simply acknowledges' - trigger: + triggers: platform: event event_type: telegram_callback event_data: command: "/do_nothing" - action: + actions: - action: telegram_bot.answer_callback_query data: callback_query_id: "{{ trigger.event.data.id }}" @@ -530,12 +530,12 @@ Telegram callbacks also support arguments and commands the same way as normal me ```yaml - alias: 'Telegram bot repeats arguments on callback query' - trigger: + triggers: platform: event event_type: telegram_callback event_data: command: "/repeat" - action: + actions: - action: telegram_bot.answer_callback_query data: show_alert: true @@ -553,12 +553,12 @@ Receiving `chat_id` and `message_id` identifiers of sent messages by the `telegr ```yaml - alias: 'Notifications about messages sent by Telegram bot' - trigger: + triggers: platform: event event_type: telegram_sent event_data: message_tag: "msg_start" - action: + actions: - action: input_number.set_value data_template: entity_id: input_number.chat_id @@ -574,7 +574,7 @@ Receiving `chat_id` and `message_id` identifiers of sent messages by the `telegr ## Example: send_message with formatted Text ```yaml -action: +actions: - action: notify.telegrambot data: title: Example Message @@ -584,7 +584,7 @@ action: ## Example: send_message with message tag ```yaml -action: +actions: - action: notify.telegrambot data: title: Example Message @@ -596,7 +596,7 @@ action: ## Example: send_message with disabled webpage preview: ```yaml -action: +actions: - action: notify.telegram data: message: >- diff --git a/source/_integrations/template.markdown b/source/_integrations/template.markdown index 63760a5fba8..bdd30e19bf8 100644 --- a/source/_integrations/template.markdown +++ b/source/_integrations/template.markdown @@ -110,7 +110,7 @@ The state, including attributes, of trigger-based sensors and binary sensors is ```yaml # Example configuration entry template: - - trigger: + - triggers: - platform: time_pattern # This will update every night hours: 0 diff --git a/source/_integrations/tensorflow.markdown b/source/_integrations/tensorflow.markdown index b8e0ab42b20..597e72e2821 100644 --- a/source/_integrations/tensorflow.markdown +++ b/source/_integrations/tensorflow.markdown @@ -209,11 +209,11 @@ image_processing: ```yaml # Example advanced automations.yaml entry - alias: "TensorFlow scanning" - trigger: + triggers: - platform: state entity_id: - binary_sensor.driveway - action: + actions: - action: image_processing.scan target: entity_id: camera.driveway diff --git a/source/_integrations/thermoworks_smoke.markdown b/source/_integrations/thermoworks_smoke.markdown index 7557cddcc3e..e79c6d3c9d9 100644 --- a/source/_integrations/thermoworks_smoke.markdown +++ b/source/_integrations/thermoworks_smoke.markdown @@ -107,7 +107,7 @@ input_number: automation: - alias: "Alert when My Smoke Probe 1 is above threshold" - trigger: + triggers: platform: template value_template: >- {% if (states("sensor.my_smoke_probe_1") | float) > (states("input_number.smoke_probe_1_threshold") | float) %} @@ -115,7 +115,7 @@ automation: {% else %} False {% endif %} - action: + actions: - action: notify.all data: message: > diff --git a/source/_integrations/tibber.markdown b/source/_integrations/tibber.markdown index 157d8d3d444..c133dfc9adb 100644 --- a/source/_integrations/tibber.markdown +++ b/source/_integrations/tibber.markdown @@ -42,7 +42,7 @@ To use notifications, please see the [getting started with automation page](/get ### Send message ```yaml -action: +actions: action: notify.send_message data: entity_id: notify.tibber @@ -143,14 +143,14 @@ The electricity price can be used to make automations. The sensor has a `max_pri ```yaml - alias: "Electricity price" - trigger: + triggers: platform: time_pattern # Matches every hour at 1 minutes past whole minutes: 1 - condition: + conditions: condition: template value_template: '{{ float(states('sensor.electricity_price_hamretunet_10')) > 0.9 * float(state_attr('sensor.electricity_price_hamretunet_10', 'max_price')) }}' - action: + actions: - action: notify.pushbullet data: title: "Electricity price" diff --git a/source/_integrations/timer.markdown b/source/_integrations/timer.markdown index bc179282d24..2791b39415d 100644 --- a/source/_integrations/timer.markdown +++ b/source/_integrations/timer.markdown @@ -153,11 +153,11 @@ timer: - alias: "Timerswitch" id: "Timerstart" # Timer is started when the switch pumprun is set to on. - trigger: + triggers: - platform: state entity_id: switch.pumprun to: "on" - action: + actions: - action: timer.start target: entity_id: timer.test @@ -165,12 +165,12 @@ timer: # When timer is stopped, the time run out, another message is sent - alias: "Timerstop" id: "Timerstop" - trigger: + triggers: - platform: event event_type: timer.finished event_data: entity_id: timer.test - action: + actions: - action: notify.nma data: message: "Timer stop" diff --git a/source/_integrations/totalconnect.markdown b/source/_integrations/totalconnect.markdown index 83236b33fb5..d0270f64aa9 100644 --- a/source/_integrations/totalconnect.markdown +++ b/source/_integrations/totalconnect.markdown @@ -39,32 +39,32 @@ Give the user access to your Location, along with a user code, usually a 4 digit ```yaml automation: - alias: "Alarm: Disarmed Daytime" - trigger: + triggers: platform: state entity_id: alarm_control_panel.total_connect to: "disarmed" - condition: + conditions: condition: sun before: sunset - action: + actions: action: scene.turn_on target: entity_id: scene.OnDisarmedDaytime - alias: "Alarm: Armed Away" - trigger: + triggers: platform: state entity_id: alarm_control_panel.total_connect to: "armed_away" - action: + actions: action: scene.turn_on target: entity_id: scene.OnArmedAway - alias: "Alarm: Arm Home Instant at Sunset" - trigger: + triggers: platform: sun event: sunset offset: '0' - action: + actions: action: totalconnect.arm_home_instant target: entity_id: alarm_control_panel.total_connect diff --git a/source/_integrations/traccar_server.markdown b/source/_integrations/traccar_server.markdown index 0f51f4e9cf5..17078b09b32 100644 --- a/source/_integrations/traccar_server.markdown +++ b/source/_integrations/traccar_server.markdown @@ -266,11 +266,11 @@ The allows you to do something when the device "Millennium Falcon" enters the de {% details "Show me the YAML!" %} ```yaml -trigger: +triggers: - platform: state entity_id: sensor.millennium_falcon_geofence to: 'Tatooine' -action: +actions: ... ``` @@ -285,11 +285,11 @@ The allows you to do something when the device "Millennium Falcon" exceeds a def {% details "Show me the YAML!" %} ```yaml -trigger: +triggers: - platform: numeric_state entity_id: sensor.millennium_falcon_speed above: 1337 -action: +actions: ... ``` @@ -298,9 +298,9 @@ If you want to include the speed in a notification, you can use the `{{ trigger. Partial example: ```yaml -trigger: +triggers: ... -action: +actions: - action: notify.notify data: message: "The current speed of the Millennium falcon is {{ trigger.to_state.state }}!" diff --git a/source/_integrations/transmission.markdown b/source/_integrations/transmission.markdown index 2c00f5b1756..eb9047ba11c 100644 --- a/source/_integrations/transmission.markdown +++ b/source/_integrations/transmission.markdown @@ -62,10 +62,10 @@ Example of an automation that notifies on successful download and removes the to ```yaml - alias: "Notify and remove completed torrent" - trigger: + triggers: - platform: event event_type: transmission_downloaded_torrent - action: + actions: - action: notify.telegram_notifier data: title: "Torrent completed!" diff --git a/source/_integrations/twilio.markdown b/source/_integrations/twilio.markdown index c3d2aab155c..65fbd27f964 100644 --- a/source/_integrations/twilio.markdown +++ b/source/_integrations/twilio.markdown @@ -56,7 +56,7 @@ Here is an example: ```yaml automation: - trigger: + triggers: platform: event event_type: twilio_data_received event_data: @@ -64,7 +64,7 @@ automation: To: '+1YYYYYYYYYYY' CallStatus: ringing Direction: inbound - action: + actions: action: cover.open_cover target: entity_id: cover.garage_door @@ -77,10 +77,10 @@ An example of an SMS handler: {% raw %} ```yaml alias: Twilio incoming -trigger: +triggers: - platform: event event_type: twilio_data_received -action: +actions: - variables: sender: | {{ trigger.event.data.From }} diff --git a/source/_integrations/twilio_call.markdown b/source/_integrations/twilio_call.markdown index 2d81081dc47..445ee823fde 100644 --- a/source/_integrations/twilio_call.markdown +++ b/source/_integrations/twilio_call.markdown @@ -48,10 +48,10 @@ Twilio is a notification platform and thus can be controlled by calling the noti # Example automation notification entry automation: - alias: "The sun has set" - trigger: + triggers: platform: sun event: sunset - action: + actions: action: notify.twilio_call data: message: "The sun has set" diff --git a/source/_integrations/twilio_sms.markdown b/source/_integrations/twilio_sms.markdown index f433bb369d2..7f6dcd02ebc 100644 --- a/source/_integrations/twilio_sms.markdown +++ b/source/_integrations/twilio_sms.markdown @@ -51,10 +51,10 @@ Media can be included with messages by setting the optional `media_url` variable # Example automation notification entry automation: - alias: "The sun has set" - trigger: + triggers: platform: sun event: sunset - action: + actions: action: notify.twilio_sms data: message: "The sun has set" diff --git a/source/_integrations/universal.markdown b/source/_integrations/universal.markdown index b4a9887ab27..786a5b06436 100644 --- a/source/_integrations/universal.markdown +++ b/source/_integrations/universal.markdown @@ -258,23 +258,23 @@ media_player: automation: - alias: Turn on the TV when Kodi is activated - trigger: + triggers: platform: state entity_id: media_player.kodi_tv from: "off" to: playing - action: + actions: - action: media_player.turn_on target: entity_id: media_player.kodi_tv - alias: Turn off the TV when Kodi is in idle > 15 min - trigger: + triggers: platform: state entity_id: media_player.kodi_tv to: idle for: minutes: 15 - action: + actions: - action: media_player.turn_off target: entity_id: media_player.kodi_tv diff --git a/source/_integrations/upb.markdown b/source/_integrations/upb.markdown index 9acd6a7903c..bca12af6b04 100644 --- a/source/_integrations/upb.markdown +++ b/source/_integrations/upb.markdown @@ -178,13 +178,13 @@ Start a scene blinking. - alias: "'Specific scene activated'" description: "Trigger when scene 9 on network 42 is activated" - trigger: + triggers: platform: event event_type: upb.scene_changed event_data: command: activated address: "42_9" - action: + actions: action: persistent_notification.create data: title: "Scene Activated" diff --git a/source/_integrations/update.markdown b/source/_integrations/update.markdown index 20e4b9f1afd..88829a7441d 100644 --- a/source/_integrations/update.markdown +++ b/source/_integrations/update.markdown @@ -147,11 +147,11 @@ the update for a light bulb becomes available. ```yaml automation: - alias: "Send notification when update available" - trigger: + triggers: platform: state entity_id: update.my_light_bulb to: "on" - action: + actions: alias: "Send notification to my phone about the update" action: notify.iphone data: diff --git a/source/_integrations/utility_meter.markdown b/source/_integrations/utility_meter.markdown index 01dadd8cc36..b02d354e82e 100644 --- a/source/_integrations/utility_meter.markdown +++ b/source/_integrations/utility_meter.markdown @@ -212,7 +212,7 @@ a time based automation can be used: ```yaml automation: - trigger: + triggers: - platform: time at: "09:00:00" variables: @@ -221,7 +221,7 @@ automation: at: "21:00:00" variables: tariff: "offpeak" - action: + actions: - action: select.select_option target: entity_id: select.daily_energy diff --git a/source/_integrations/vacuum.mqtt.markdown b/source/_integrations/vacuum.mqtt.markdown index 8351b02b4f4..1d8ef5d236c 100644 --- a/source/_integrations/vacuum.mqtt.markdown +++ b/source/_integrations/vacuum.mqtt.markdown @@ -276,10 +276,10 @@ Action trigger example: ```yaml - alias: "Push command based on sensor" - trigger: + triggers: - platform: state entity_id: sensor.sensor - action: + actions: action: vacuum.send_command target: entity_id: vacuum.vacuum_entity diff --git a/source/_integrations/valve.markdown b/source/_integrations/valve.markdown index 862d6fcc5e6..4eab65a5a2d 100644 --- a/source/_integrations/valve.markdown +++ b/source/_integrations/valve.markdown @@ -57,10 +57,10 @@ Valves that allow setting a specific position may also be controlled with `valve ```yaml automation: - trigger: + triggers: platform: time at: "07:15:00" - action: + actions: - action: valve.close target: entity_id: valve.demo @@ -79,10 +79,10 @@ Set the position of one or multiple valves if they support setting a specific po ```yaml automation: - trigger: + triggers: platform: time at: "07:15:00" - action: + actions: - action: valve.set_position target: entity_id: valve.demo diff --git a/source/_integrations/velbus.markdown b/source/_integrations/velbus.markdown index f41e6c923f6..e815f9826f0 100644 --- a/source/_integrations/velbus.markdown +++ b/source/_integrations/velbus.markdown @@ -124,27 +124,27 @@ The actual linking can be realized by two automation rules. One rule to control # Control light living from Velbus push_button_10 - id: 'Control_light_living_from_Velbus' alias: "Control light living using Velbus push_button_10" - trigger: + triggers: - entity_id: binary_sensor.push_button_10 platform: state to: "on" - condition: [] - action: + conditions: [] + actions: - entity_id: light.living action: light.toggle # Keep status LED push_button_10 in sync to status light living - id: 'Update LED of push_button_10' alias: "Update LED state of push_button_10" - trigger: + triggers: - entity_id: light.living platform: state to: "on" - entity_id: light.living platform: state to: "off" - condition: [] - action: + conditions: [] + actions: - condition: or conditions: - condition: and diff --git a/source/_integrations/velux.markdown b/source/_integrations/velux.markdown index 7d23943bda4..b39e1234bd2 100644 --- a/source/_integrations/velux.markdown +++ b/source/_integrations/velux.markdown @@ -50,10 +50,10 @@ As a workaround, you can use an automation to force a restart of the KLF 200 bef automation: alias: KLF reboot on hass stop event description: Reboots the KLF200 in order to avoid SSL Handshake issue - trigger: + triggers: - platform: homeassistant event: shutdown - action: + actions: - action: velux.reboot_gateway ``` diff --git a/source/_integrations/verisure.markdown b/source/_integrations/verisure.markdown index a186b42f9de..095e27a84a1 100644 --- a/source/_integrations/verisure.markdown +++ b/source/_integrations/verisure.markdown @@ -53,10 +53,10 @@ The `changed_by` attribute enables one to be able to take different actions depe ```yaml automation: - alias: "Alarm status changed" - trigger: + triggers: - platform: state entity_id: alarm_control_panel.alarm_1 - action: + actions: - action: notify.notify data: message: > diff --git a/source/_integrations/vivotek.markdown b/source/_integrations/vivotek.markdown index 115f8c1e2bb..dde5a43382c 100644 --- a/source/_integrations/vivotek.markdown +++ b/source/_integrations/vivotek.markdown @@ -121,7 +121,7 @@ Play a live stream from a camera to selected media player(s). Requires [`stream` For example, the following action in an automation would send an `hls` live stream to your chromecast. ```yaml -action: +actions: action: camera.play_stream target: entity_id: camera.yourcamera @@ -161,7 +161,7 @@ For example, the following action is an automation that would take a snapshot fr {% raw %} ```yaml -action: +actions: action: camera.snapshot target: entity_id: camera.front_door_camera diff --git a/source/_integrations/water_heater.markdown b/source/_integrations/water_heater.markdown index d99d3d918e7..b499b1a2823 100644 --- a/source/_integrations/water_heater.markdown +++ b/source/_integrations/water_heater.markdown @@ -58,10 +58,10 @@ Sets target temperature of water heater device. ```yaml automation: - trigger: + triggers: platform: time at: "07:15:00" - action: + actions: - action: water_heater.set_temperature target: entity_id: water_heater.demo @@ -83,10 +83,10 @@ Set operation mode for water heater device ```yaml automation: - trigger: + triggers: platform: time at: "07:15:00" - action: + actions: - action: water_heater.set_operation_mode target: entity_id: water_heater.demo @@ -107,10 +107,10 @@ Turn away mode on or off for water heater device ```yaml automation: - trigger: + triggers: platform: time at: "07:15:00" - action: + actions: - action: water_heater.set_away_mode target: entity_id: water_heater.demo diff --git a/source/_integrations/webostv.markdown b/source/_integrations/webostv.markdown index a0183080940..ccc5edc280a 100644 --- a/source/_integrations/webostv.markdown +++ b/source/_integrations/webostv.markdown @@ -51,10 +51,10 @@ wake_on_lan: # enables `wake_on_lan` integration automation: - alias: "Turn On Living Room TV with WakeOnLan" - trigger: + triggers: - platform: webostv.turn_on entity_id: media_player.lg_webos_smart_tv - action: + actions: - action: wake_on_lan.send_magic_packet data: mac: aa:bb:cc:dd:ee:ff @@ -162,11 +162,11 @@ The icon can be overridden for individual notifications by providing a path to a ```yaml automation: - alias: "Front door motion" - trigger: + triggers: platform: state entity_id: binary_sensor.front_door_motion to: "on" - action: + actions: action: notify.livingroom_tv data: message: "Movement detected: Front Door" diff --git a/source/_integrations/wemo.markdown b/source/_integrations/wemo.markdown index daa960d97a9..28f0905674b 100644 --- a/source/_integrations/wemo.markdown +++ b/source/_integrations/wemo.markdown @@ -147,13 +147,13 @@ The following is an example implementation of an automation: # Example automation - id: long_press_living_room alias: "Toggle amplifier power" - trigger: + triggers: - platform: event event_type: wemo_subscription_event event_data: type: LongPress name: Living Room - action: + actions: - action: media_player.toggle target: entity_id: media_player.amplifier diff --git a/source/_integrations/wled.markdown b/source/_integrations/wled.markdown index 6d858121c65..ea1e4714958 100644 --- a/source/_integrations/wled.markdown +++ b/source/_integrations/wled.markdown @@ -202,11 +202,11 @@ Here is an example of all of these put together into an automation: ```yaml - alias: "Turn on WLED rain effect when weather changes to rainy" - trigger: + triggers: - platform: state entity_id: sensor.weather_condition to: "rainy" - action: + actions: - action: light.turn_on target: entity_id: light.wled diff --git a/source/_integrations/workday.markdown b/source/_integrations/workday.markdown index 8878df4608d..d66aa6b5215 100644 --- a/source/_integrations/workday.markdown +++ b/source/_integrations/workday.markdown @@ -83,14 +83,14 @@ Example usage for automation: ```yaml automation: alias: "Turn on heater on workdays" - trigger: + triggers: platform: time at: "08:00:00" - condition: + conditions: condition: state entity_id: binary_sensor.workday_sensor state: "on" - action: + actions: action: switch.turn_on target: entity_id: switch.heater diff --git a/source/_integrations/xiaomi_aqara.markdown b/source/_integrations/xiaomi_aqara.markdown index bee0a1f5774..cd04863bde0 100644 --- a/source/_integrations/xiaomi_aqara.markdown +++ b/source/_integrations/xiaomi_aqara.markdown @@ -163,13 +163,13 @@ This example plays the sound of a dog barking when the button is held down and s ```yaml - alias: "Let a dog bark on long press" - trigger: + triggers: platform: event event_type: xiaomi_aqara.click event_data: entity_id: binary_sensor.switch_158d000xxxxxc2 click_type: long_click_press - action: + actions: action: xiaomi_aqara.play_ringtone data: gw_mac: xxxxxxxxxxxx @@ -177,13 +177,13 @@ This example plays the sound of a dog barking when the button is held down and s ringtone_vol: 8 - alias: "Stop barking immediately on single click" - trigger: + triggers: platform: event event_type: xiaomi_aqara.click event_data: entity_id: binary_sensor.switch_158d000xxxxxc2 click_type: single - action: + actions: action: xiaomi_aqara.stop_ringtone data: gw_mac: xxxxxxxxxxxx @@ -195,13 +195,13 @@ This example toggles the living room lamp on a double click of the button. ```yaml - alias: "Double Click to toggle living room lamp" - trigger: + triggers: platform: event event_type: xiaomi_aqara.click event_data: entity_id: binary_sensor.switch_158d000xxxxxc2 click_type: double - action: + actions: action: light.toggle target: entity_id: light.living_room_lamp diff --git a/source/_integrations/xiaomi_miio.markdown b/source/_integrations/xiaomi_miio.markdown index 1c231239121..bfbb02eca22 100644 --- a/source/_integrations/xiaomi_miio.markdown +++ b/source/_integrations/xiaomi_miio.markdown @@ -1499,11 +1499,11 @@ Inline array: ```yaml automation: - alias: "Test vacuum zone3" - trigger: + triggers: - event: start platform: homeassistant - condition: [] - action: + conditions: [] + actions: - action: xiaomi_miio.vacuum_clean_zone target: entity_id: vacuum.xiaomi_vacuum @@ -1520,11 +1520,11 @@ Array with inline zone: ```yaml automation: - alias: "Test vacuum zone3" - trigger: + triggers: - event: start platform: homeassistant - condition: [] - action: + conditions: [] + actions: - action: xiaomi_miio.vacuum_clean_zone target: entity_id: vacuum.xiaomi_vacuum @@ -1542,11 +1542,11 @@ Array mode: ```yaml automation: - alias: "Test vacuum zone3" - trigger: + triggers: - event: start platform: homeassistant - condition: [] - action: + conditions: [] + actions: - action: xiaomi_miio.vacuum_clean_zone target: entity_id: vacuum.xiaomi_vacuum @@ -1579,11 +1579,11 @@ Multiple segments: ```yaml automation: - alias: "Vacuum kitchen and living room" - trigger: + triggers: - event: start platform: homeassistant - condition: [] - action: + conditions: [] + actions: - action: xiaomi_miio.vacuum_clean_segment target: entity_id: vacuum.xiaomi_vacuum @@ -1596,11 +1596,11 @@ Single segment: ```yaml automation: - alias: "Vacuum kitchen" - trigger: + triggers: - event: start platform: homeassistant - condition: [] - action: + conditions: [] + actions: - action: xiaomi_miio.vacuum_clean_segment target: entity_id: vacuum.xiaomi_vacuum @@ -1613,10 +1613,10 @@ The original app for Xiaomi vacuum has a nice feature of room cleaning with repe ```yaml automation: - alias: "Vacuum kitchen" - trigger: + triggers: - event: start platform: homeassistant - action: + actions: - action: xiaomi_miio.vacuum_clean_segment target: entity_id: vacuum.xiaomi_vacuum diff --git a/source/_integrations/yale.markdown b/source/_integrations/yale.markdown index 61a946f7ef4..edc378c4eeb 100644 --- a/source/_integrations/yale.markdown +++ b/source/_integrations/yale.markdown @@ -140,14 +140,14 @@ Using the lock operation sensors, you can detect when a user operates a lock and - id: "1583706446906" alias: "joe_doe_front_door_operate" description: John Doe locks or unlocks the Front Door - trigger: + triggers: - entity_id: sensor.front_door_operator platform: state to: John Doe - condition: + conditions: - condition: template value_template: "{{ not state_attr('sensor.front_door_operator', 'remote') }}" - action: + actions: - data: {} entity_id: camera.inside service: camera.turn_off diff --git a/source/_integrations/zoneminder.markdown b/source/_integrations/zoneminder.markdown index ee5d39a38e9..71e97fd596f 100644 --- a/source/_integrations/zoneminder.markdown +++ b/source/_integrations/zoneminder.markdown @@ -105,7 +105,7 @@ Once loaded, the `zoneminder` platform will expose an action (`set_run_state`) t For example, if your ZoneMinder instance was configured with a run state called "Home", you could write an [automation](/getting-started/automation/) that changes ZoneMinder to the "Home" run state by including the following [action](/getting-started/automation-action/): ```yaml -action: +actions: action: zoneminder.set_run_state data: id: ZM_HOST diff --git a/source/_integrations/zwave_js.markdown b/source/_integrations/zwave_js.markdown index 8fa865ec96e..8dabe83c992 100644 --- a/source/_integrations/zwave_js.markdown +++ b/source/_integrations/zwave_js.markdown @@ -500,7 +500,7 @@ Notification event data can be used to trigger automations, both in the automati ```yaml # Fires whenever the lock is unlocked by the keypad. -trigger: +triggers: - platform: event event_type: zwave_js_notification event_data: @@ -646,12 +646,12 @@ Value Updated example: This event can be used to trigger a refresh of values when the new state needs to be retrieved. Here's an example automation: ```yaml -trigger: +triggers: - platform: event event_type: zwave_js_value_updated event_data: entity_id: switch.in_wall_dual_relay_switch -action: +actions: - action: zwave_js.refresh_value data: entity_id: @@ -671,7 +671,7 @@ This trigger platform can be used to trigger automations on any Z-Wave JS value ```yaml # Fires whenever the `latchStatus` value changes from `closed` to `opened` on the three devices (devices will be derived from an entity ID). -trigger: +triggers: platform: zwave_js.value_updated # At least one `device_id` or `entity_id` must be provided device_id: 45d7d3230dbb7441473ec883dab294d4 # Garage Door Lock device ID @@ -721,7 +721,7 @@ There is strict validation in place based on all known event types, so if you co ```yaml # Fires whenever the `interview failed` event is fired on the three devices (devices will be derived from device and entity IDs). -trigger: +triggers: platform: zwave_js.event # At least one `device_id` or `entity_id` must be provided for `node` events. For any other events, a `config_entry_id` needs to be provided. device_id: 45d7d3230dbb7441473ec883dab294d4 # Garage Door Lock device ID diff --git a/source/voice_control/custom_sentences.markdown b/source/voice_control/custom_sentences.markdown index 7924dc94905..04ef2dc08f1 100644 --- a/source/voice_control/custom_sentences.markdown +++ b/source/voice_control/custom_sentences.markdown @@ -148,7 +148,7 @@ As mentioned above, you can then use the `intent_script` integration to implemen # Example configuration.yaml intent_script: SetVolume: - action: + actions: service: "media_player.volume_set" data: entity_id: "{{ media_player }}"