diff --git a/source/_docs/automation/action.markdown b/source/_docs/automation/action.markdown index 33fdc8b4302..25c6d702c8f 100644 --- a/source/_docs/automation/action.markdown +++ b/source/_docs/automation/action.markdown @@ -15,7 +15,7 @@ You can also perform the action to activate [a scene](/integrations/scene/) whic automation: # Change the light in the kitchen and living room to 150 brightness and color red. triggers: - - platform: sun + - trigger: sun event: sunset actions: - action: light.turn_on @@ -30,7 +30,7 @@ automation: automation 2: # Notify me on my mobile phone of an event triggers: - - platform: sun + - trigger: sun event: sunset offset: -00:30 variables: @@ -54,7 +54,7 @@ Conditions can also be part of an action. You can combine multiple actions and c automation: - alias: "Office at evening" triggers: - - platform: state + - trigger: state entity_id: sensor.office_occupancy to: "on" actions: diff --git a/source/_docs/automation/condition.markdown b/source/_docs/automation/condition.markdown index 234128a7ebb..3dc1ad96a71 100644 --- a/source/_docs/automation/condition.markdown +++ b/source/_docs/automation/condition.markdown @@ -17,7 +17,7 @@ Example of using condition: automation: - alias: "Turn on office lights" triggers: - - platform: state + - trigger: state entity_id: sensor.office_motion_sensor to: "on" conditions: @@ -45,7 +45,7 @@ The `condition` option of an automation, also accepts a single condition templat automation: - alias: "Turn on office lights" triggers: - - platform: state + - trigger: state entity_id: sensor.office_motion_sensor to: "on" condition: "{{ state_attr('sun.sun', 'elevation') < 4 }}" diff --git a/source/_docs/automation/templating.markdown b/source/_docs/automation/templating.markdown index 7a39e95976d..2e5442c21dd 100644 --- a/source/_docs/automation/templating.markdown +++ b/source/_docs/automation/templating.markdown @@ -202,7 +202,7 @@ These are the properties available for a [Zone trigger](/docs/automation/trigger # Example configuration.yaml entries automation: triggers: - - platform: state + - trigger: state entity_id: device_tracker.paulus id: paulus_device actions: @@ -216,7 +216,7 @@ automation: automation 2: triggers: - - platform: mqtt + - trigger: mqtt topic: "/notify/+" actions: action: > @@ -227,7 +227,7 @@ automation 2: automation 3: triggers: # Multiple entities for which you want to perform the same action. - - platform: state + - trigger: state entity_id: - light.bedroom_closet - light.kiddos_closet @@ -244,7 +244,7 @@ automation 3: automation 4: triggers: # When an NFC tag is scanned by Home Assistant... - - platform: event + - trigger: event event_type: tag_scanned # ...By certain people context: diff --git a/source/_docs/automation/trigger.markdown b/source/_docs/automation/trigger.markdown index 27244fa4551..827b431bac7 100644 --- a/source/_docs/automation/trigger.markdown +++ b/source/_docs/automation/trigger.markdown @@ -47,13 +47,13 @@ This video tutorial explains how trigger IDs work. ```yaml automation: triggers: - - platform: event + - trigger: event event_type: "MY_CUSTOM_EVENT" id: "custom_event" - - platform: mqtt + - trigger: mqtt topic: "living_room/switch/ac" id: "ac_on" - - platform: state # This trigger will be assigned id="2" + - trigger: state # This trigger will be assigned id="2" entity_id: - device_tracker.paulus - device_tracker.anne_therese @@ -75,7 +75,7 @@ automation: trigger_variables: my_event: example_event triggers: - - platform: event + - trigger: event # Able to use `trigger_variables` event_type: "{{ my_event }}" # These variables are evaluated and set when this trigger is triggered @@ -94,7 +94,7 @@ Events can be fired by integrations or via the API. There is no limitation to th ```yaml automation: triggers: - - platform: event + - trigger: event event_type: "MY_CUSTOM_EVENT" # optional event_data: @@ -112,7 +112,7 @@ event that contain no, or similar, data and contexts. ```yaml automation: triggers: - - platform: event + - trigger: event event_type: - automation_reloaded - scene_reloaded @@ -133,7 +133,7 @@ automation: node: ac value: on triggers: - - platform: event + - trigger: event event_type: "{{ 'MY_CUSTOM_EVENT_' ~ sub_event }}" ``` @@ -146,7 +146,7 @@ Fires when Home Assistant starts up or shuts down. ```yaml automation: triggers: - - platform: homeassistant + - trigger: homeassistant # Event can also be 'shutdown' event: start ``` @@ -162,7 +162,7 @@ Fires when a specific message is received on given MQTT topic. Optionally can ma ```yaml automation: triggers: - - platform: mqtt + - trigger: mqtt topic: "living_room/switch/ac" # Optional payload: "on" @@ -177,7 +177,7 @@ The trigger in the example below will trigger only when the message received on ```yaml automation: triggers: - - platform: mqtt + - trigger: mqtt topic: "living_room/switch/ac" payload: "on" value_template: "{{ value_json.state }}" @@ -200,7 +200,7 @@ automation: node: "ac" value: "on" triggers: - - platform: mqtt + - trigger: mqtt topic: "{{ room ~ '/switch/' ~ node}}" # Optional payload: "{{ 'state:' ~ value }}" @@ -223,7 +223,7 @@ If the current state of your entity is `50` and you set the threshold to `below: ```yaml automation: triggers: - - platform: numeric_state + - trigger: numeric_state entity_id: sensor.temperature # If given, will trigger when the value of the given attribute for the given entity changes.. attribute: attribute_name @@ -248,7 +248,7 @@ When the `attribute` option is specified the trigger is compared to the given `a ```yaml automation: triggers: - - platform: numeric_state + - trigger: numeric_state entity_id: climate.kitchen attribute: current_temperature above: 23 @@ -265,7 +265,7 @@ The state of the entity can be referenced like this: ```yaml automation: triggers: - - platform: numeric_state + - trigger: numeric_state entity_id: sensor.temperature value_template: "{{ state.state | float * 9 / 5 + 32 }}" above: 70 @@ -280,7 +280,7 @@ Attributes of the entity can be referenced like this: ```yaml automation: triggers: - - platform: numeric_state + - trigger: numeric_state entity_id: climate.kitchen value_template: "{{ state.attributes.current_temperature - state.attributes.temperature_set_point }}" above: 3 @@ -300,7 +300,7 @@ However, the comparison will only be made when the entity specified in the trigg ```yaml automation: triggers: - - platform: numeric_state + - trigger: numeric_state entity_id: sensor.outside_temperature # Other entity ids can be specified for above and/or below thresholds above: sensor.inside_temperature @@ -313,7 +313,7 @@ The `for:` can also be specified as `HH:MM:SS` like this: ```yaml automation: triggers: - - platform: numeric_state + - trigger: numeric_state entity_id: sensor.temperature # At least one of the following required above: 17 @@ -332,7 +332,7 @@ You can also use templates in the `for` option. ```yaml automation: triggers: - - platform: numeric_state + - trigger: numeric_state entity_id: - sensor.temperature_1 - sensor.temperature_2 @@ -379,7 +379,7 @@ This automation triggers if either Paulus or Anne-Therese are home for one minut ```yaml automation: triggers: - - platform: state + - trigger: state entity_id: - device_tracker.paulus - device_tracker.anne_therese @@ -399,7 +399,7 @@ It's possible to give a list of `from` states or `to` states: ```yaml automation: triggers: - - platform: state + - trigger: state entity_id: vacuum.test from: - "cleaning" @@ -412,7 +412,7 @@ If you want to trigger on all state changes, but not on attribute changes, you c ```yaml automation: triggers: - - platform: state + - trigger: state entity_id: vacuum.test to: ``` @@ -422,7 +422,7 @@ If you want to trigger on all state changes *except* specific ones, use `not_fro ```yaml automation: triggers: - - platform: state + - trigger: state entity_id: vacuum.test not_from: - "unknown" @@ -443,7 +443,7 @@ For example, this trigger only fires when the boiler has been heating for 10 min ```yaml automation: triggers: - - platform: state + - trigger: state entity_id: climate.living_room attribute: hvac_action to: "heating" @@ -455,7 +455,7 @@ This trigger fires whenever the boiler's `hvac_action` attribute changes: ```yaml automation: triggers: - - platform: state + - trigger: state entity_id: climate.living_room attribute: hvac_action ``` @@ -470,7 +470,7 @@ state for 30 seconds: ```yaml automation: triggers: - - platform: state + - trigger: state entity_id: light.office # Must stay "on" for 30 seconds to: "on" @@ -489,7 +489,7 @@ the time specified, but doesn't care about "playing" or "paused". ```yaml automation: triggers: - - platform: state + - trigger: state entity_id: media_player.kitchen # Not "off" for 30 minutes from: "off" @@ -505,7 +505,7 @@ same for `for` the time specified, regardless of the current state value. ```yaml automation: triggers: - - platform: state + - trigger: state entity_id: media_player.kitchen # The media player remained in its current state for 1 hour for: "01:00:00" @@ -518,7 +518,7 @@ You can also use templates in the `for` option. ```yaml automation: triggers: - - platform: state + - trigger: state entity_id: - device_tracker.paulus - device_tracker.anne_therese @@ -557,7 +557,7 @@ Since the duration of twilight is different throughout the year, it is recommend ```yaml automation: triggers: - - platform: sun + - trigger: sun # Possible values: sunset, sunrise event: sunset # Optional time offset. This example will trigger 45 minutes before sunset. @@ -574,7 +574,7 @@ Sometimes you may want more granular control over an automation than simply suns automation: - alias: "Exterior Lighting on when dark outside" triggers: - - platform: numeric_state + - trigger: numeric_state entity_id: sun.sun attribute: elevation # Can be a positive or negative number @@ -608,7 +608,7 @@ scanned using the Home Assistant Companion mobile application. ```yaml automation: triggers: - - platform: tag + - trigger: tag tag_id: A7-6B-90-5F ``` @@ -618,7 +618,7 @@ device/scanner by setting the `device_id`: ```yaml automation: triggers: - - platform: tag + - trigger: tag tag_id: A7-6B-90-5F device_id: 0e19cd3cf2b311ea88f469a7512c307d ``` @@ -628,7 +628,7 @@ Or trigger on multiple possible devices for multiple tags: ```yaml automation: triggers: - - platform: tag + - trigger: tag tag_id: - "A7-6B-90-5F" - "A7-6B-15-AC" @@ -650,7 +650,7 @@ With template triggers you can also evaluate attribute changes by using is_state ```yaml automation: triggers: - - platform: template + - trigger: template value_template: "{% if is_state('device_tracker.paulus', 'home') %}true{% endif %}" # If given, will trigger when template remains true for X time. @@ -666,7 +666,7 @@ You can also use templates in the `for` option. ```yaml automation: triggers: - - platform: template + - trigger: template value_template: "{{ is_state('device_tracker.paulus', 'home') }}" for: minutes: "{{ states('input_number.minutes')|int(0) }}" @@ -695,7 +695,7 @@ A string that represents a time to fire on each day. Can be specified as `HH:MM` ```yaml automation: - triggers: - - platform: time + - trigger: time # Military time format. This trigger will fire at 3:32 PM at: "15:32:00" ``` @@ -715,7 +715,7 @@ The entity ID of an [input datetime](/integrations/input_datetime/). ```yaml automation: - triggers: - - platform: state + - trigger: state entity_id: binary_sensor.motion to: "on" actions: @@ -730,7 +730,7 @@ automation: {{ (now().timestamp() + 2*60*60) | timestamp_custom('%Y-%m-%d %H:%M:%S') }} - triggers: - - platform: time + - trigger: time at: input_datetime.turn_off_ac actions: - action: climate.turn_off @@ -747,7 +747,7 @@ The Entity ID of a [sensor](/integrations/sensor/) with the "timestamp" device c ```yaml automation: - triggers: - - platform: time + - trigger: time at: sensor.phone_next_alarm actions: - action: light.turn_on @@ -764,7 +764,7 @@ For example, this trigger fires 5 minutes before the phone alarm goes off. ```yaml automation: - triggers: - - platform: time + - trigger: time at: entity_id: sensor.phone_next_alarm offset: -00:05:00 @@ -785,7 +785,7 @@ Multiple times can be provided in a list. All formats can be intermixed. ```yaml automation: triggers: - - platform: time + - trigger: time at: - input_datetime.leave_for_work - "18:30:00" @@ -800,20 +800,20 @@ With the time pattern trigger, you can match if the hour, minute or second of th ```yaml automation: triggers: - - platform: time_pattern + - trigger: time_pattern # Matches every hour at 5 minutes past whole minutes: 5 automation 2: triggers: - - platform: time_pattern + - trigger: time_pattern # Trigger once per minute during the hour of 3 hours: "3" minutes: "*" automation 3: triggers: - - platform: time_pattern + - trigger: time_pattern # You can also match on interval. This will match every 5 minutes minutes: "/5" ``` @@ -829,7 +829,7 @@ Persistent notification triggers are fired when a `persistent_notification` is ` ```yaml automation: triggers: - - platform: persistent_notification + - trigger: persistent_notification update_type: - added - removed @@ -845,7 +845,7 @@ Webhook trigger fires when a web request is made to the webhook endpoint: `/api/ ```yaml automation: triggers: - - platform: webhook + - trigger: webhook webhook_id: "some_hook_id" allowed_methods: - POST @@ -893,7 +893,7 @@ Zone trigger fires when an entity is entering or leaving the zone. The entity ca ```yaml automation: triggers: - - platform: zone + - trigger: zone entity_id: person.paulus zone: zone.home # Event is either enter or leave @@ -912,7 +912,7 @@ This isn't for use with `device_tracker` entities. For those look above at the ` ```yaml automation: triggers: - - platform: geo_location + - trigger: geo_location source: nsw_rural_fire_service_feed zone: zone.bushfire_alert_zone # Event is either enter or leave @@ -939,7 +939,7 @@ An optional time offset can be given to have it fire a set time before or after ```yaml automation: triggers: - - platform: calendar + - trigger: calendar # Possible values: start, end event: start # The calendar entity_id @@ -960,7 +960,7 @@ Sentences are allowed to use some basic [template syntax](https://developers.hom ```yaml automation: triggers: - - platform: conversation + - trigger: conversation command: - "[it's ]party time" - "happy (new year|birthday)" @@ -1004,10 +1004,10 @@ It is possible to specify multiple triggers for the same rule. To do so just pre automation: triggers: # first trigger - - platform: time_pattern + - trigger: time_pattern minutes: 5 # our second trigger is the sunset - - platform: sun + - trigger: sun event: sunset ``` @@ -1018,7 +1018,7 @@ It is possible to specify multiple entities for the same trigger. To do so add m ```yaml automation: triggers: - - platform: state + - trigger: state entity_id: - sensor.one - sensor.two @@ -1037,11 +1037,11 @@ automation: # This trigger will not trigger, as it is disabled. # This automation does not run when the sun is set. - enabled: false - platform: sun + trigger: sun event: sunset # This trigger will fire, as it is not disabled. - - platform: time + - trigger: time at: "15:32:00" ``` @@ -1067,10 +1067,10 @@ blueprint: _enable_number: !input input_number triggers: - - platform: sun + - trigger: sun event_type: sunrise enabled: !input input_boolean - - platform: sun + - trigger: sun event_type: sunset enabled: "{{ _enable_number < 50 }}" ``` @@ -1095,7 +1095,7 @@ blueprint: trigger: triggers: - - platform: event + - trigger: event event_type: manual_event - triggers: !input usertrigger ``` diff --git a/source/_docs/automation/yaml.markdown b/source/_docs/automation/yaml.markdown index 688a281b962..291c2a384a0 100644 --- a/source/_docs/automation/yaml.markdown +++ b/source/_docs/automation/yaml.markdown @@ -16,7 +16,7 @@ automation: !include automations.yaml # Labeled automation block automation kitchen: - triggers: - - platform: ... + - trigger: ... ``` You can add as many labeled `automation` blocks as you want. @@ -141,10 +141,10 @@ automation my_lights: triggers: # Prefix the first line of each trigger configuration # with a '-' to enter multiple - - platform: sun + - trigger: sun event: sunset offset: "-01:00:00" - - platform: state + - trigger: state entity_id: all to: "home" conditions: @@ -165,7 +165,7 @@ automation my_lights: # Turn off lights when everybody leaves the house - alias: "Rule 2 - Away Mode" triggers: - - platform: state + - trigger: state entity_id: all to: "not_home" actions: @@ -176,7 +176,7 @@ automation my_lights: # Notify when Paulus leaves the house in the evening - alias: "Leave Home notification" triggers: - - platform: zone + - trigger: zone event: leave zone: zone.home entity_id: device_tracker.paulus @@ -192,7 +192,7 @@ automation my_lights: - alias: "Xiaomi Cube Action" initial_state: false triggers: - - platform: event + - trigger: event event_type: cube_action event_data: entity_id: binary_sensor.cube_158d000103a3de @@ -218,7 +218,7 @@ automation: - alias: "Automation Name" initial_state: false triggers: - - platform: ... + - trigger: ... ``` ### Number of debug traces stored @@ -231,7 +231,7 @@ automation: trace: stored_traces: 10 triggers: - - platform: ... + - trigger: ... ``` ## Migrating your YAML automations to `automations.yaml` @@ -245,7 +245,7 @@ If you want to migrate your manual automations to use the editor, you'll have to - id: my_unique_id # <-- Required for editor to work, for automations created with the editor the id will be automatically generated. alias: "Hello world" triggers: - - platform: state + - trigger: state entity_id: sun.sun from: below_horizon to: above_horizon diff --git a/source/_docs/blueprint/schema.markdown b/source/_docs/blueprint/schema.markdown index d8ffe87bc17..ed32c9345dd 100644 --- a/source/_docs/blueprint/schema.markdown +++ b/source/_docs/blueprint/schema.markdown @@ -268,7 +268,7 @@ mode: restart max_exceeded: silent triggers: - - platform: state + - trigger: state entity_id: !input motion_entity from: "off" to: "on" @@ -277,7 +277,7 @@ actions: - action: light.turn_on target: !input light_target - wait_for_trigger: - platform: state + trigger: state entity_id: !input motion_entity from: "on" to: "off" diff --git a/source/_docs/blueprint/selectors.markdown b/source/_docs/blueprint/selectors.markdown index 4350905f66b..ca4ed195ee7 100644 --- a/source/_docs/blueprint/selectors.markdown +++ b/source/_docs/blueprint/selectors.markdown @@ -1535,7 +1535,7 @@ The output of this selector is a list of triggers. For example: ```yaml # Example trigger selector output result -- platform: numeric_state +- trigger: numeric_state entity_id: "sensor.outside_temperature" below: 20 ``` diff --git a/source/_docs/blueprint/tutorial.markdown b/source/_docs/blueprint/tutorial.markdown index 1129921f9a5..3483f7b0df5 100644 --- a/source/_docs/blueprint/tutorial.markdown +++ b/source/_docs/blueprint/tutorial.markdown @@ -45,7 +45,7 @@ The automation we're going to use in this tutorial controls a light based on a m ```yaml triggers: - platform: state + trigger: state entity_id: binary_sensor.motion_kitchen actions: @@ -92,7 +92,7 @@ Configurable parts in blueprints are called [inputs](/docs/blueprint/schema/#blu ```yaml triggers: - platform: state + trigger: state entity_id: !input motion_sensor ``` @@ -234,7 +234,7 @@ blueprint: - domain: light triggers: - - platform: state + - trigger: state entity_id: !input motion_sensor actions: diff --git a/source/_docs/configuration/splitting_configuration.markdown b/source/_docs/configuration/splitting_configuration.markdown index 9f6c41b9e82..d6943593710 100644 --- a/source/_docs/configuration/splitting_configuration.markdown +++ b/source/_docs/configuration/splitting_configuration.markdown @@ -268,7 +268,7 @@ These work recursively. As an example using `!include_dir_list automation`, will automation: - alias: "Automation 1" triggers: - platform: state + trigger: state entity_id: device_tracker.iphone to: "home" actions: @@ -277,7 +277,7 @@ automation: entity_id: light.entryway - alias: "Automation 2" triggers: - platform: state + trigger: state entity_id: device_tracker.iphone from: "home" actions: @@ -299,7 +299,7 @@ automation: !include_dir_list automation/presence/ ```yaml alias: "Automation 1" triggers: - platform: state + trigger: state entity_id: device_tracker.iphone to: "home" actions: @@ -313,7 +313,7 @@ actions: ```yaml alias: "Automation 2" triggers: - platform: state + trigger: state entity_id: device_tracker.iphone from: "home" actions: @@ -409,7 +409,7 @@ speech: automation: - alias: "Automation 1" triggers: - - platform: state + - trigger: state entity_id: device_tracker.iphone to: "home" actions: @@ -418,7 +418,7 @@ automation: entity_id: light.entryway - alias: "Automation 2" triggers: - - platform: state + - trigger: state entity_id: device_tracker.iphone from: "home" actions: @@ -440,7 +440,7 @@ automation: !include_dir_merge_list automation/ ```yaml - alias: "Automation 1" triggers: - - platform: state + - trigger: state entity_id: device_tracker.iphone to: "home" actions: @@ -449,7 +449,7 @@ automation: !include_dir_merge_list automation/ entity_id: light.entryway - alias: "Automation 2" triggers: - - platform: state + - trigger: state entity_id: device_tracker.iphone from: "home" actions: diff --git a/source/_docs/scene.markdown b/source/_docs/scene.markdown index c6b83c01861..3a03f601a41 100644 --- a/source/_docs/scene.markdown +++ b/source/_docs/scene.markdown @@ -58,7 +58,7 @@ Scenes can be activated using the action `scene.turn_on` (there is no 'scene.tur # Example automation automation: triggers: - platform: state + trigger: state entity_id: device_tracker.sweetheart from: "not_home" to: "home" @@ -76,7 +76,7 @@ With the `scene.apply` action you are able to apply a scene without first defini # Example automation automation: triggers: - platform: state + trigger: state entity_id: device_tracker.sweetheart from: "not_home" to: "home" @@ -105,7 +105,7 @@ light will transition to the scene in 2.5 seconds. # Example automation automation: triggers: - platform: state + trigger: state entity_id: device_tracker.sweetheart from: "not_home" to: "home" diff --git a/source/_docs/scripts.markdown b/source/_docs/scripts.markdown index 91badaf4499..d66d28519ef 100644 --- a/source/_docs/scripts.markdown +++ b/source/_docs/scripts.markdown @@ -231,9 +231,9 @@ This {% term action %} can use the same triggers that are available in an automa # Wait for a custom event or light to turn on and stay on for 10 sec - alias: "Wait for MY_EVENT or light on" wait_for_trigger: - - platform: event + - trigger: event event_type: MY_EVENT - - platform: state + - trigger: state entity_id: light.LIGHT to: "on" for: 10 @@ -262,7 +262,7 @@ You can also get the script to abort after the timeout by using optional `contin # Wait for IFTTT event or abort after specified timeout. - wait_for_trigger: - - platform: event + - trigger: event event_type: ifttt_webhook_received event_data: action: connected_to_network @@ -312,7 +312,7 @@ This can be used to take different actions based on whether or not the condition target: entity_id: switch.some_light - wait_for_trigger: - - platform: state + - trigger: state entity_id: binary_sensor.door_2 to: "on" for: 2 @@ -361,7 +361,7 @@ The following {% term automation %} example shows how to raise a custom event ca ```yaml - alias: "Fire Event" triggers: - - platform: state + - trigger: state entity_id: switch.kitchen to: "on" actions: @@ -377,7 +377,7 @@ The following {% term automation %} example shows how to capture the custom even ```yaml - alias: "Capture Event" triggers: - - platform: event + - trigger: event event_type: event_light_state_changed actions: - action: notify.notify @@ -525,7 +525,7 @@ _until_ the condition(s) evaluate to true. ```yaml automation: - triggers: - - platform: state + - trigger: state entity_id: binary_sensor.xyz to: "on" conditions: @@ -622,7 +622,7 @@ The `choose` {% term action %} can be used like an "if/then/elseif/then.../else" # Example with "if", "elif" and "else" automation: - triggers: - - platform: state + - trigger: state entity_id: input_boolean.simulate to: "on" mode: restart @@ -665,7 +665,7 @@ For example: ```yaml automation: - triggers: - - platform: state + - trigger: state entity_id: input_select.home_mode actions: - choose: @@ -707,7 +707,7 @@ When the sun goes below the horizon, the `porch` and `garden` lights must turn o automation: - alias: "Turn lights on when the sun gets dim and if some room is occupied" triggers: - - platform: numeric_state + - trigger: numeric_state entity_id: sun.sun attribute: elevation below: 4 @@ -771,7 +771,7 @@ groups themselves. In total, four actions are executed, one after the other. ```yaml automation: - triggers: - - platform: state + - trigger: state entity_id: binary_sensor.motion to: "on" actions: @@ -808,7 +808,7 @@ The following example shows sending messages out at the same time (in parallel): ```yaml automation: - triggers: - - platform: state + - trigger: state entity_id: binary_sensor.motion to: "on" actions: @@ -831,7 +831,7 @@ script: - parallel: - sequence: - wait_for_trigger: - - platform: state + - trigger: state entity_id: binary_sensor.motion to: "on" - action: notify.person1 diff --git a/source/_docs/tools/dev-tools.markdown b/source/_docs/tools/dev-tools.markdown index 3cf3fc39e1c..96144a1481e 100644 --- a/source/_docs/tools/dev-tools.markdown +++ b/source/_docs/tools/dev-tools.markdown @@ -105,7 +105,7 @@ If there is an automation that handles that event, it will be automatically trig ```yaml - alias: "Capture Event" triggers: - platform: event + trigger: event event_type: event_light_state_changed actions: - action: notify.notify diff --git a/source/_integrations/alert.markdown b/source/_integrations/alert.markdown index 7e1933d9d53..41f30d117c8 100644 --- a/source/_integrations/alert.markdown +++ b/source/_integrations/alert.markdown @@ -286,7 +286,7 @@ but you will still receive the done message. ```yaml - alias: "Telegram callback to stop alerts for garage door" triggers: - - platform: event + - trigger: event event_type: telegram_callback event_data: data: "/garage_acknowledge" diff --git a/source/_integrations/amcrest.markdown b/source/_integrations/amcrest.markdown index a916b23f0b9..4e65cf78117 100644 --- a/source/_integrations/amcrest.markdown +++ b/source/_integrations/amcrest.markdown @@ -437,7 +437,7 @@ Using this {% term trigger %} in an {% term automation %} will allow you to dete alias: Doorbell Pressed description: "Trigger when Amcrest Button Press Event Fires" triggers: - - platform: event + - trigger: event event_type: amcrest event_data: event: "CallNoAnswered" diff --git a/source/_integrations/august.markdown b/source/_integrations/august.markdown index 2a43d7edc9e..91984d597a1 100644 --- a/source/_integrations/august.markdown +++ b/source/_integrations/august.markdown @@ -149,7 +149,7 @@ Using the lock operation sensors, you can detect when a user operates a lock and description: John Doe locks or unlocks the Front Door triggers: - entity_id: sensor.front_door_operator - platform: state + trigger: state to: John Doe conditions: - condition: template diff --git a/source/_integrations/azure_service_bus.markdown b/source/_integrations/azure_service_bus.markdown index 49a83778098..5041c74ecfb 100644 --- a/source/_integrations/azure_service_bus.markdown +++ b/source/_integrations/azure_service_bus.markdown @@ -82,7 +82,7 @@ See the example below for how an automation trigger translates to a message on t automation: - alias: "Sunset Service Bus message" triggers: - platform: sun + trigger: sun event: sunset actions: action: notify.test_queue diff --git a/source/_integrations/backup.markdown b/source/_integrations/backup.markdown index 0538cbf42b4..38e868723f8 100644 --- a/source/_integrations/backup.markdown +++ b/source/_integrations/backup.markdown @@ -52,7 +52,7 @@ at 3 AM: automation: - alias: "Backup Home Assistant every night at 3 AM" triggers: - platform: time + trigger: time at: "03:00:00" actions: alias: "Create backup now" diff --git a/source/_integrations/binary_sensor.xiaomi_aqara.markdown b/source/_integrations/binary_sensor.xiaomi_aqara.markdown index 3072351aee0..951971e334d 100644 --- a/source/_integrations/binary_sensor.xiaomi_aqara.markdown +++ b/source/_integrations/binary_sensor.xiaomi_aqara.markdown @@ -40,7 +40,7 @@ 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" triggers: - platform: state + trigger: state entity_id: binary_sensor.motion_sensor_158d000xxxxxc2 from: "off" to: "on" @@ -59,7 +59,7 @@ The requirement is that you have setup the [`xiaomi aqara` integration](/integra entity_id: automation.MOTION_OFF - alias: "If there no motion for 5 minutes turn off the gateway light" triggers: - platform: state + trigger: state entity_id: binary_sensor.motion_sensor_158d000xxxxxc2 from: "on" to: "off" @@ -79,7 +79,7 @@ The requirement is that you have setup the [`xiaomi aqara` integration](/integra ```yaml - alias: "If the window is open turn off the radiator" triggers: - platform: state + trigger: state entity_id: binary_sensor.door_window_sensor_158d000xxxxxc2 from: "off" to: "on" @@ -91,7 +91,7 @@ The requirement is that you have setup the [`xiaomi aqara` integration](/integra operation_mode: "Off" - alias: "If the window is closed for 5 minutes turn on the radiator again" triggers: - platform: state + trigger: state entity_id: binary_sensor.door_window_sensor_158d000xxxxxc2 from: "on" to: "off" @@ -105,7 +105,7 @@ The requirement is that you have setup the [`xiaomi aqara` integration](/integra operation_mode: "Smart schedule" - alias: "Notify if door is opened when away" triggers: - platform: state + trigger: state entity_id: binary_sensor.door_window_sensor_15xxxxxxc9xx6b from: "off" to: "on" @@ -124,7 +124,7 @@ The requirement is that you have setup the [`xiaomi aqara` integration](/integra ```yaml - alias: "Send notification on fire alarm" triggers: - platform: state + trigger: state entity_id: binary_sensor.smoke_sensor_158d0001574899 from: "off" to: "on" @@ -147,7 +147,7 @@ The requirement is that you have setup the [`xiaomi aqara` integration](/integra ```yaml - alias: "Send notification on gas alarm" triggers: - platform: state + trigger: state entity_id: binary_sensor.natgas_sensor_158dxxxxxxxxxx from: "off" to: "on" @@ -167,7 +167,7 @@ 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" triggers: - platform: event + trigger: event event_type: xiaomi_aqara.click event_data: entity_id: binary_sensor.switch_158d000xxxxxc2 @@ -178,7 +178,7 @@ As indicated in the table on top of this page there are 3 versions of the button entity_id: switch.wall_switch_left_158d000xxxxx01 - alias: "Toggle couch light on double click" triggers: - platform: event + trigger: event event_type: xiaomi_aqara.click event_data: entity_id: binary_sensor.switch_158d000xxxxxc2 @@ -189,7 +189,7 @@ As indicated in the table on top of this page there are 3 versions of the button entity_id: switch.wall_switch_right_158d000xxxxx01 - alias: "Let a dog bark on long press" triggers: - platform: event + trigger: event event_type: xiaomi_aqara.click event_data: entity_id: binary_sensor.switch_158d000xxxxxc2 @@ -209,7 +209,7 @@ Available events are `flip90`, `flip180`, `move`, `tap_twice`, `shake_air`, `swi ```yaml - alias: "Cube event flip90" triggers: - platform: event + trigger: event event_type: xiaomi_aqara.cube_action event_data: entity_id: binary_sensor.cube_15xxxxxxxxxxxx @@ -222,7 +222,7 @@ Available events are `flip90`, `flip180`, `move`, `tap_twice`, `shake_air`, `swi color_name: "springgreen" - alias: "Cube event flip180" triggers: - platform: event + trigger: event event_type: xiaomi_aqara.cube_action event_data: entity_id: binary_sensor.cube_15xxxxxxxxxxxx @@ -235,7 +235,7 @@ Available events are `flip90`, `flip180`, `move`, `tap_twice`, `shake_air`, `swi color_name: "darkviolet" - alias: "Cube event move" triggers: - platform: event + trigger: event event_type: xiaomi_aqara.cube_action event_data: entity_id: binary_sensor.cube_15xxxxxxxxxxxx @@ -248,7 +248,7 @@ Available events are `flip90`, `flip180`, `move`, `tap_twice`, `shake_air`, `swi color_name: "gold" - alias: "Cube event tap_twice" triggers: - platform: event + trigger: event event_type: xiaomi_aqara.cube_action event_data: entity_id: binary_sensor.cube_15xxxxxxxxxxxx @@ -261,7 +261,7 @@ Available events are `flip90`, `flip180`, `move`, `tap_twice`, `shake_air`, `swi color_name: "deepskyblue" - alias: "Cube event shake_air" triggers: - platform: event + trigger: event event_type: xiaomi_aqara.cube_action event_data: entity_id: binary_sensor.cube_15xxxxxxxxxxxx @@ -283,7 +283,7 @@ The Aqara Wireless Switch is available as single-key and double-key version. Eac ```yaml - alias: "Decrease brightness of the gateway light" triggers: - platform: event + trigger: event event_type: xiaomi_aqara.click event_data: entity_id: binary_sensor.wall_switch_left_158xxxxxxxxx12 @@ -306,7 +306,7 @@ The Aqara Wireless Switch is available as single-key and double-key version. Eac - alias: "Increase brightness of the gateway light" triggers: - platform: event + trigger: event event_type: xiaomi_aqara.click event_data: entity_id: binary_sensor.wall_switch_right_158xxxxxxxxx12 @@ -329,7 +329,7 @@ The Aqara Wireless Switch is available as single-key and double-key version. Eac - alias: "Turn off the gateway light" triggers: - platform: event + trigger: event event_type: xiaomi_aqara.click event_data: entity_id: binary_sensor.wall_switch_both_158xxxxxxxxx12 @@ -349,7 +349,7 @@ This automation toggles the living room lamp on vibration/tilt. ```yaml - alias: "Turn on Living Room Lamp on vibration" triggers: - platform: event + trigger: event event_type: xiaomi_aqara.movement event_data: entity_id: binary_sensor.vibration_xxxx000000 @@ -360,7 +360,7 @@ This automation toggles the living room lamp on vibration/tilt. entity_id: light.living_room_lamp - alias: "Turn on Living Room Lamp on tilt" triggers: - platform: event + trigger: event event_type: xiaomi_aqara.movement event_data: entity_id: binary_sensor.vibration_xxxx000000 diff --git a/source/_integrations/blink.markdown b/source/_integrations/blink.markdown index cad4742a6aa..d6969dcc31c 100644 --- a/source/_integrations/blink.markdown +++ b/source/_integrations/blink.markdown @@ -136,7 +136,7 @@ Here, this example assumes your blink module is named `My Sync Module` and that - id: arm_blink_when_away alias: "Arm Blink When Away" triggers: - platform: state + trigger: state entity_id: all to: "not_home" actions: @@ -153,7 +153,7 @@ Similar to the previous example, this automation will disarm blink when arriving - id: disarm_blink_when_home alias: "Disarm Blink When Home" triggers: - platform: state + trigger: state entity_id: all to: "home" actions: @@ -174,7 +174,7 @@ The following example assumes your camera's name (in the Blink app) is `My Camer - id: save_blink_video_on_motion alias: "Save Blink Video on Motion" triggers: - platform: state + trigger: state entity_id: binary_sensor.blink_my_camera_motion_detected to: "on" actions: @@ -203,7 +203,7 @@ The file name of the downloaded video file is not configurable. - id: save_recent_clips_from_my_camera alias: "Save Recent Clips from My Camera" triggers: - - platform: time_pattern + - trigger: time_pattern minutes: /3 actions: - action: blink.save_recent_clips diff --git a/source/_integrations/button.markdown b/source/_integrations/button.markdown index ac33027fc84..ac62dcc0ccf 100644 --- a/source/_integrations/button.markdown +++ b/source/_integrations/button.markdown @@ -46,7 +46,7 @@ means we can use it in our automations. For example: ```yaml triggers: - - platform: state + - trigger: state entity_id: button.my_button actions: - action: notify.frenck diff --git a/source/_integrations/calendar.markdown b/source/_integrations/calendar.markdown index 0116463f572..935e5876e61 100644 --- a/source/_integrations/calendar.markdown +++ b/source/_integrations/calendar.markdown @@ -64,7 +64,7 @@ An example of a calendar {% term trigger %} in YAML: ```yaml automation: - triggers: - - platform: calendar + - trigger: calendar # Possible values: start, end event: start # The calendar entity_id @@ -100,7 +100,7 @@ This example automation consists of: automation: - alias: Calendar notification triggers: - - platform: calendar + - trigger: calendar event: start entity_id: calendar.personal actions: @@ -127,10 +127,10 @@ This example consists of: automation: - alias: Front Light Schedule triggers: - - platform: calendar + - trigger: calendar event: start entity_id: calendar.device_automation - - platform: calendar + - trigger: calendar event: end entity_id: calendar.device_automation conditions: diff --git a/source/_integrations/cisco_webex_teams.markdown b/source/_integrations/cisco_webex_teams.markdown index 48e5e98dc27..c880c561dfa 100644 --- a/source/_integrations/cisco_webex_teams.markdown +++ b/source/_integrations/cisco_webex_teams.markdown @@ -66,7 +66,7 @@ Here are the automations for the above screenshot: # Show a one line message with a red banner - alias: "Notify On Build Failing" triggers: - - platform: webhook + - trigger: webhook webhook_id: build_failed actions: action: notify.cisco_webex_teams_notify @@ -79,7 +79,7 @@ Here are the automations for the above screenshot: # with lists, a person mention and a link - alias: "Notify On Build Unstable" triggers: - - platform: webhook + - trigger: webhook webhook_id: build_unstable actions: action: notify.cisco_webex_teams_notify @@ -102,7 +102,7 @@ Here are the automations for the above screenshot: # with lists, a person mention and a link - alias: "Notify On Build Passing" triggers: - - platform: webhook + - trigger: webhook webhook_id: build_passed actions: action: notify.cisco_webex_teams_notify diff --git a/source/_integrations/clicksend_tts.markdown b/source/_integrations/clicksend_tts.markdown index 7d779411fd5..8d75574c042 100644 --- a/source/_integrations/clicksend_tts.markdown +++ b/source/_integrations/clicksend_tts.markdown @@ -62,7 +62,7 @@ ClickSend is a notify platform and thus can be controlled by calling the notify ```yaml alias: "The sun has set" triggers: - - platform: sun + - trigger: sun event: sunset actions: - action: notify.clicksend_tts diff --git a/source/_integrations/climate.markdown b/source/_integrations/climate.markdown index 94fa3e05595..293ecf8be2f 100644 --- a/source/_integrations/climate.markdown +++ b/source/_integrations/climate.markdown @@ -53,7 +53,7 @@ Turn auxiliary heater on/off for climate device ```yaml automation: triggers: - platform: time + trigger: time at: "07:15:00" actions: - action: climate.set_aux_heat @@ -79,7 +79,7 @@ reflecting a situation where the climate device is set to save energy. For examp ```yaml automation: triggers: - platform: time + trigger: time at: "07:15:00" actions: - action: climate.set_preset_mode @@ -107,7 +107,7 @@ Set target temperature of climate device ### Set temperature to 24 in heat mode automation: triggers: - platform: time + trigger: time at: "07:15:00" actions: - action: climate.set_temperature @@ -122,7 +122,7 @@ automation: ### Set temperature range to 20 to 24 in heat_cool mode automation: triggers: - platform: time + trigger: time at: "07:15:00" actions: - action: climate.set_temperature @@ -148,7 +148,7 @@ Set target humidity of climate device ```yaml automation: triggers: - platform: time + trigger: time at: "07:15:00" actions: - action: climate.set_humidity @@ -172,7 +172,7 @@ Set fan operation for climate device ```yaml automation: triggers: - platform: time + trigger: time at: "07:15:00" actions: - action: climate.set_fan_mode @@ -196,7 +196,7 @@ Set climate device's HVAC mode ```yaml automation: triggers: - platform: time + trigger: time at: "07:15:00" actions: - action: climate.set_hvac_mode @@ -220,7 +220,7 @@ Set swing operation mode for climate device ```yaml automation: triggers: - platform: time + trigger: time at: "07:15:00" actions: - action: climate.set_swing_mode diff --git a/source/_integrations/color_extractor.markdown b/source/_integrations/color_extractor.markdown index 9582d357a42..9ad00aadf06 100644 --- a/source/_integrations/color_extractor.markdown +++ b/source/_integrations/color_extractor.markdown @@ -55,7 +55,7 @@ Example usage in an {% term automation %}, taking the album art present on a Chr - alias: "Chromecast to Shelf Lights" triggers: - - platform: state + - trigger: state entity_id: media_player.chromecast actions: @@ -72,7 +72,7 @@ With a nicer transition period of 5 seconds and setting brightness to 100% each - alias: "Nicer Chromecast to Shelf Lights" triggers: - - platform: state + - trigger: state entity_id: media_player.chromecast actions: diff --git a/source/_integrations/counter.markdown b/source/_integrations/counter.markdown index 3384d1ba4b7..b832321de95 100644 --- a/source/_integrations/counter.markdown +++ b/source/_integrations/counter.markdown @@ -150,7 +150,7 @@ automation: - id: 'errorcounterautomation' alias: "Error Counting Automation" triggers: - platform: event + trigger: event event_type: system_log_event event_data: level: ERROR diff --git a/source/_integrations/cover.markdown b/source/_integrations/cover.markdown index 74b65e6d3dd..03420898b32 100644 --- a/source/_integrations/cover.markdown +++ b/source/_integrations/cover.markdown @@ -76,7 +76,7 @@ Available actions: `cover.open_cover`, `cover.close_cover`, `cover.stop_cover`, ```yaml automation: triggers: - platform: time + trigger: time at: "07:15:00" actions: - action: cover.open_cover @@ -98,7 +98,7 @@ Set cover position of one or multiple covers. ```yaml automation: triggers: - platform: time + trigger: time at: "07:15:00" actions: - action: cover.set_cover_position @@ -122,7 +122,7 @@ Set cover tilt position of one or multiple covers. ```yaml automation: triggers: - platform: time + trigger: time at: "07:15:00" actions: - action: cover.set_cover_tilt_position diff --git a/source/_integrations/cover.template.markdown b/source/_integrations/cover.template.markdown index 63872507bab..c24773e2854 100644 --- a/source/_integrations/cover.template.markdown +++ b/source/_integrations/cover.template.markdown @@ -292,7 +292,7 @@ script: automation: - alias: "Close covers at night" triggers: - - platform: sun + - trigger: sun event: sunset offset: "+00:30:00" actions: diff --git a/source/_integrations/deconz.markdown b/source/_integrations/deconz.markdown index 76cb019bf18..f4fd897d3ab 100644 --- a/source/_integrations/deconz.markdown +++ b/source/_integrations/deconz.markdown @@ -195,7 +195,7 @@ automation: - alias: "'Toggle lamp from dimmer'" initial_state: "on" triggers: - - platform: event + - trigger: event event_type: deconz_event event_data: id: remote_control_1 @@ -208,7 +208,7 @@ automation: - alias: "Increase brightness of lamp from dimmer" initial_state: "on" triggers: - - platform: event + - trigger: event event_type: deconz_event event_data: id: remote_control_1 @@ -225,7 +225,7 @@ automation: - alias: "Decrease brightness of lamp from dimmer" initial_state: "on" triggers: - - platform: event + - trigger: event event_type: deconz_event event_data: id: remote_control_1 @@ -242,7 +242,7 @@ automation: - alias: 'Turn lamp on when turning cube clockwise' initial_state: "on" triggers: - - platform: event + - trigger: event event_type: deconz_event event_data: id: remote_control_1 @@ -263,7 +263,7 @@ automation: automation: - alias: "React to color wheel changes" triggers: - - platform: event + - trigger: event event_type: deconz_event event_data: id: tint_remote_1 @@ -289,7 +289,7 @@ automation: - alias: "Flash Hue Bulb with Doorbell Motion" mode: single triggers: - - platform: state + - trigger: state entity_id: binary_sensor.doorbell_motion to: "on" actions: diff --git a/source/_integrations/device_automation.markdown b/source/_integrations/device_automation.markdown index 244d60476bd..601b4d86354 100644 --- a/source/_integrations/device_automation.markdown +++ b/source/_integrations/device_automation.markdown @@ -23,7 +23,7 @@ Example: - id: "123456789" alias: "Light turns off" triggers: - - platform: device + - trigger: device device_id: 7a92d5ee74014a0b86903fc669b0bcd6 domain: light type: turn_off diff --git a/source/_integrations/dexcom.markdown b/source/_integrations/dexcom.markdown index cff278431cf..c38c08f1129 100644 --- a/source/_integrations/dexcom.markdown +++ b/source/_integrations/dexcom.markdown @@ -50,7 +50,7 @@ If you have a sensor session running, and once you have enabled the Dexcom integ triggers: - below: '65' entity_id: sensor.dexcom_YOUR_USERNAME_glucose_value - platform: numeric_state + trigger: numeric_state condition: time after: "22:00:00" before: "06:00:00" diff --git a/source/_integrations/doods.markdown b/source/_integrations/doods.markdown index c5dda2d6b64..b781c3b7c9c 100644 --- a/source/_integrations/doods.markdown +++ b/source/_integrations/doods.markdown @@ -216,7 +216,7 @@ image_processing: # Example advanced automations.yaml entry - alias: "Doods scanning" triggers: - - platform: state + - trigger: state entity_id: - binary_sensor.driveway actions: diff --git a/source/_integrations/doorbird.markdown b/source/_integrations/doorbird.markdown index faf707c746c..aa33ee92a49 100644 --- a/source/_integrations/doorbird.markdown +++ b/source/_integrations/doorbird.markdown @@ -105,7 +105,7 @@ The example automation below shows how to turn on a light when somebody presses ```yaml - alias: "Doorbird Ring" triggers: - platform: event + trigger: event event_type: doorbird_driveway_gate_somebody_pressed_the_button actions: action: light.turn_on diff --git a/source/_integrations/dovado.markdown b/source/_integrations/dovado.markdown index 2e97dd874b9..87a06666e09 100644 --- a/source/_integrations/dovado.markdown +++ b/source/_integrations/dovado.markdown @@ -77,7 +77,7 @@ This is a notify platform and thus can be controlled by calling the notify actio automation: - alias: "The sun has set" triggers: - platform: sun + trigger: sun event: sunset actions: action: notify.dovado diff --git a/source/_integrations/downloader.markdown b/source/_integrations/downloader.markdown index a6e154ca388..ee4cc7253f6 100644 --- a/source/_integrations/downloader.markdown +++ b/source/_integrations/downloader.markdown @@ -52,7 +52,7 @@ Along with the event the following payload parameters are available: ```yaml - alias: "Download Failed Notification" triggers: - platform: event + trigger: event event_type: downloader_download_failed actions: action: persistent_notification.create diff --git a/source/_integrations/easyenergy.markdown b/source/_integrations/easyenergy.markdown index 2b06936f943..ea7bfd8e1b6 100644 --- a/source/_integrations/easyenergy.markdown +++ b/source/_integrations/easyenergy.markdown @@ -168,7 +168,7 @@ You can use the response data in a template sensor that is updated every hour: ```yaml template: - triggers: - - platform: time_pattern + - trigger: time_pattern seconds: "*" actions: - action: easyenergy.get_energy_usage_prices diff --git a/source/_integrations/elgato.markdown b/source/_integrations/elgato.markdown index 26b74c64dea..7fc57f799af 100644 --- a/source/_integrations/elgato.markdown +++ b/source/_integrations/elgato.markdown @@ -83,7 +83,7 @@ a binary sensor (a doorbell) is triggered: ```yaml - alias: Visual doorbell notification example triggers: - - platform: state + - trigger: state entity_id: binary_sensor.doorbell to: "on" actions: diff --git a/source/_integrations/emulated_roku.markdown b/source/_integrations/emulated_roku.markdown index 5fbb3421480..0047b5d35de 100644 --- a/source/_integrations/emulated_roku.markdown +++ b/source/_integrations/emulated_roku.markdown @@ -117,7 +117,7 @@ The following is an example implementation of an automation: - id: amp_volume_up alias: "Increase amplifier volume" triggers: - - platform: event + - trigger: event event_type: roku_command event_data: source_name: Home Assistant diff --git a/source/_integrations/energyzero.markdown b/source/_integrations/energyzero.markdown index 2818ed3657f..d9d3a12a116 100644 --- a/source/_integrations/energyzero.markdown +++ b/source/_integrations/energyzero.markdown @@ -137,7 +137,7 @@ The response data can be added to a template sensor: ```yaml template: - triggers: - - platform: time_pattern + - trigger: time_pattern hours: "*" actions: - action: energyzero.get_energy_prices diff --git a/source/_integrations/enocean.markdown b/source/_integrations/enocean.markdown index 79e1a8f4df2..b1346305086 100644 --- a/source/_integrations/enocean.markdown +++ b/source/_integrations/enocean.markdown @@ -112,7 +112,7 @@ Sample automation to switch lights on and off: automation: - alias: "Hall light switches" triggers: - platform: event + trigger: event event_type: button_pressed event_data: id: [0xYY, 0xYY, 0xYY, 0xYY] diff --git a/source/_integrations/event.markdown b/source/_integrations/event.markdown index 3543acce9a3..27ce54661da 100644 --- a/source/_integrations/event.markdown +++ b/source/_integrations/event.markdown @@ -46,7 +46,7 @@ Because the state of an event entity in Home Assistant is a timestamp, it means ```yaml triggers: - - platform: state + - trigger: state entity_id: event.doorbell actions: - action: notify.frenck @@ -64,7 +64,7 @@ When combining that with the [choose action](/docs/scripts/#choose-a-group-of-ac ```yaml triggers: - - platform: state + - trigger: state entity_id: event.hue_remote_control actions: - alias: "Choose an action based on the type of event" diff --git a/source/_integrations/facebook.markdown b/source/_integrations/facebook.markdown index 971d750db04..b08c5a60e68 100644 --- a/source/_integrations/facebook.markdown +++ b/source/_integrations/facebook.markdown @@ -49,7 +49,7 @@ The phone number used in **target** should be registered with Facebook messenger automation: - alias: "Evening Greeting" triggers: - platform: sun + trigger: sun event: sunset actions: action: notify.facebook diff --git a/source/_integrations/fan.markdown b/source/_integrations/fan.markdown index a2bb67b516a..7f89016b3cb 100644 --- a/source/_integrations/fan.markdown +++ b/source/_integrations/fan.markdown @@ -51,7 +51,7 @@ Sets the speed percentage for fan device. ```yaml automation: triggers: - platform: time + trigger: time at: "07:15:00" actions: - action: fan.set_percentage @@ -75,7 +75,7 @@ Sets a preset mode for the fan device. Available preset modes are defined by the ```yaml automation: triggers: - platform: time + trigger: time at: "07:15:00" actions: - action: fan.set_preset_mode @@ -99,7 +99,7 @@ Sets the rotation for fan device. ```yaml automation: triggers: - platform: time + trigger: time at: "07:15:00" actions: - action: fan.set_direction @@ -123,7 +123,7 @@ Sets the oscillation for fan device. ```yaml automation: triggers: - platform: time + trigger: time at: "07:15:00" actions: - action: fan.oscillate @@ -157,7 +157,7 @@ Turn fan device off. This is only supported if the fan device supports being tur ```yaml automation: triggers: - platform: time + trigger: time at: "07:15:00" actions: - action: fan.turn_off @@ -181,7 +181,7 @@ Increases the speed of the fan device. ```yaml automation: triggers: - - platform: device + - trigger: device device_id: 097cd9f706a86e9163acb64ba7d630da domain: lutron_caseta type: press @@ -206,7 +206,7 @@ Decreases the speed of the fan device. ```yaml automation: triggers: - - platform: device + - trigger: device device_id: 097cd9f706a86e9163acb64ba7d630da domain: lutron_caseta type: press diff --git a/source/_integrations/feedreader.markdown b/source/_integrations/feedreader.markdown index b25a1daf119..d6c309883b3 100644 --- a/source/_integrations/feedreader.markdown +++ b/source/_integrations/feedreader.markdown @@ -30,7 +30,7 @@ Feedreader events can be used out of the box to trigger automation actions, e.g. automation: - alias: "Trigger action when new element(s) in RSS feed" triggers: - platform: event + trigger: event event_type: feedreader actions: action: script.turn_on @@ -44,7 +44,7 @@ automation: automation: - alias: "Send notification of RSS feed title when updated" triggers: - platform: event + trigger: event event_type: feedreader event_data: feed_url: "https://hasspodcast.io/feed/podcast" diff --git a/source/_integrations/fireservicerota.markdown b/source/_integrations/fireservicerota.markdown index 346db362d10..3b9e5b31f44 100644 --- a/source/_integrations/fireservicerota.markdown +++ b/source/_integrations/fireservicerota.markdown @@ -118,7 +118,7 @@ These are documented below. automation: - alias: "Switch on a light when incident is received" triggers: - platform: state + trigger: state entity_id: sensor.incidents actions: action: light.turn_on @@ -127,7 +127,7 @@ automation: - alias: "Play TTS incident details when incident is received" triggers: - platform: state + trigger: state entity_id: sensor.incidents attribute: message_to_speech_url conditions: @@ -147,7 +147,7 @@ automation: - alias: "Send response acknowledgement when a button is pressed" triggers: - platform: state + trigger: state entity_id: switch.response_button actions: action: homeassistant.turn_on @@ -156,7 +156,7 @@ automation: - alias: "Cast FireServiceRota dashboard to Nest Hub" trigger: - platform: homeassistant + trigger: homeassistant event: start actions: action: cast.show_lovelace_view diff --git a/source/_integrations/flic.markdown b/source/_integrations/flic.markdown index eaf54252143..e1132305ac7 100644 --- a/source/_integrations/flic.markdown +++ b/source/_integrations/flic.markdown @@ -79,7 +79,7 @@ The flic integration fires `flic_click` events on the bus. You can capture the e automation: - alias: "Turn on lights in the living room when flic is pressed once" triggers: - platform: event + trigger: event event_type: flic_click event_data: button_name: flic_81e4ac74b6d2 @@ -105,7 +105,7 @@ To help detect and debug flic button clicks, you can use this automation that se automation: - alias: "FLIC Html5 notify on every click" triggers: - platform: event + trigger: event event_type: flic_click actions: - action: notify.html5 diff --git a/source/_integrations/flume.markdown b/source/_integrations/flume.markdown index 1514396f28b..526043b7272 100644 --- a/source/_integrations/flume.markdown +++ b/source/_integrations/flume.markdown @@ -50,7 +50,7 @@ Example of an automation that sends a Home Assistant notification of the most re ```yaml alias: "Notify: flume" triggers: - - platform: time_pattern + - trigger: time_pattern minutes: /5 actions: - action: flume.list_notifications diff --git a/source/_integrations/folder_watcher.markdown b/source/_integrations/folder_watcher.markdown index 7d14504ec59..e5516b6bc97 100644 --- a/source/_integrations/folder_watcher.markdown +++ b/source/_integrations/folder_watcher.markdown @@ -54,7 +54,7 @@ Automations can be triggered on file system events data using a template. The fo automation:  alias: "New file alert" triggers: -   platform: state +   trigger: state entity_id: event.created actions:   action: notify.notify diff --git a/source/_integrations/foursquare.markdown b/source/_integrations/foursquare.markdown index 4f763ef6823..6f7d86e2953 100644 --- a/source/_integrations/foursquare.markdown +++ b/source/_integrations/foursquare.markdown @@ -59,7 +59,7 @@ Foursquare check-in events can be used out of the box to trigger automation acti automation: - alias: "Trigger action when you check into a venue." triggers: - platform: event + trigger: event event_type: foursquare.push actions: action: script.turn_on diff --git a/source/_integrations/fritz.markdown b/source/_integrations/fritz.markdown index d86f53cb1a6..a0b957e0dfb 100644 --- a/source/_integrations/fritz.markdown +++ b/source/_integrations/fritz.markdown @@ -117,7 +117,7 @@ fritz_box_reconnect: automation: - alias: "Reconnect FRITZ!Box" triggers: - - platform: time + - trigger: time at: "05:00:00" actions: - action: button.press @@ -132,7 +132,7 @@ automation: automation: - alias: "Guests Wi-Fi Turned On -> Send Password To Phone" triggers: - - platform: state + - trigger: state entity_id: switch.fritzbox_7530_wifi_myssid to: "on" actions: diff --git a/source/_integrations/fritzbox_callmonitor.markdown b/source/_integrations/fritzbox_callmonitor.markdown index 6ad52c4cca5..2f46bc40644 100644 --- a/source/_integrations/fritzbox_callmonitor.markdown +++ b/source/_integrations/fritzbox_callmonitor.markdown @@ -53,7 +53,7 @@ This example shows how to send notifications whenever the sensor's state changes automation: - alias: "Notify about phone state" triggers: - - platform: state + - trigger: state entity_id: sensor.phone actions: - action: notify.notify diff --git a/source/_integrations/frontier_silicon.markdown b/source/_integrations/frontier_silicon.markdown index 37a0a323e2e..eddb13e4435 100644 --- a/source/_integrations/frontier_silicon.markdown +++ b/source/_integrations/frontier_silicon.markdown @@ -50,7 +50,7 @@ In case your device (friendly name) is called *badezimmer*, an example automatio # Example configuration.yaml automation alias: "Bathroom Motion Detected" triggers: - platform: state + trigger: state entity_id: binary_sensor.motion_sensor_166d0001171111 from: "off" to: "on" diff --git a/source/_integrations/geniushub.markdown b/source/_integrations/geniushub.markdown index aa88d2b86f8..531af459e16 100644 --- a/source/_integrations/geniushub.markdown +++ b/source/_integrations/geniushub.markdown @@ -92,7 +92,7 @@ Each such entity has a state attribute that will contain a list of any such issu ```yaml - alias: "GeniusHub Error Alerts" triggers: - platform: numeric_state + trigger: numeric_state entity_id: sensor.geniushub_errors above: 0 actions: @@ -113,7 +113,7 @@ 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" triggers: - platform: state + trigger: state entity_id: binary_sensor.dual_channel_receiver_2_1 actions: - action: notify.pushbullet_notifier diff --git a/source/_integrations/geo_location.markdown b/source/_integrations/geo_location.markdown index 746ad827e71..11fc94c6970 100644 --- a/source/_integrations/geo_location.markdown +++ b/source/_integrations/geo_location.markdown @@ -57,7 +57,7 @@ zone: automation: - alias: "Bush Fire Alert" triggers: - platform: geo_location + trigger: geo_location source: nsw_rural_fire_service_feed zone: zone.bush_fire_alert_zone event: enter diff --git a/source/_integrations/github.markdown b/source/_integrations/github.markdown index a407279497c..d71970070b5 100644 --- a/source/_integrations/github.markdown +++ b/source/_integrations/github.markdown @@ -129,7 +129,7 @@ This example uses the [Latest release](#latest-release) entity provided by this ```yaml triggers: - - platform: state + - trigger: state entity_id: sensor.awesome_repository_latest_release actions: - action: notify.notify @@ -151,7 +151,7 @@ This example uses the [Stars](#diagnostic-entities) diagnostic entity provided b ```yaml triggers: - - platform: state + - trigger: state entity_id: sensor.awesome_repository_stars actions: - action: notify.notify diff --git a/source/_integrations/goodwe.markdown b/source/_integrations/goodwe.markdown index a8d5dad6bb3..006b0231215 100644 --- a/source/_integrations/goodwe.markdown +++ b/source/_integrations/goodwe.markdown @@ -46,7 +46,7 @@ The integration will poll the inverter for new values every 10 seconds. If you w ```yaml - alias: "Goodwe inverter data polling" triggers: - - platform: time_pattern + - trigger: time_pattern hours: "*" minutes: "*" seconds: "/30" diff --git a/source/_integrations/google_travel_time.markdown b/source/_integrations/google_travel_time.markdown index 229d79fa0da..b6975b70dc8 100644 --- a/source/_integrations/google_travel_time.markdown +++ b/source/_integrations/google_travel_time.markdown @@ -71,7 +71,7 @@ You can use the `homeassistant.update_entity` action to update the sensor on-dem alias: "Commute - Update morning commute sensor" initial_state: "on" triggers: - - platform: time_pattern + - trigger: time_pattern minutes: "/2" conditions: - condition: time diff --git a/source/_integrations/harmony.markdown b/source/_integrations/harmony.markdown index c762dca3c96..57e696151ca 100644 --- a/source/_integrations/harmony.markdown +++ b/source/_integrations/harmony.markdown @@ -206,7 +206,7 @@ The example below shows how to control an `input_boolean` switch using the Harmo automation: - alias: "Watch TV started from harmony hub" triggers: - platform: state + trigger: state entity_id: remote.family_room conditions: condition: template @@ -217,7 +217,7 @@ automation: entity_id: input_boolean.notify - alias: "PowerOff started from harmony hub" triggers: - platform: state + trigger: state entity_id: remote.family_room conditions: condition: template diff --git a/source/_integrations/here_travel_time.markdown b/source/_integrations/here_travel_time.markdown index cf2b1dcad99..24cced670c7 100644 --- a/source/_integrations/here_travel_time.markdown +++ b/source/_integrations/here_travel_time.markdown @@ -72,7 +72,7 @@ automation: alias: "Commute - Update morning commute sensor" initial_state: "on" triggers: - - platform: time_pattern + - trigger: time_pattern minutes: "/2" conditions: - condition: time diff --git a/source/_integrations/homekit.markdown b/source/_integrations/homekit.markdown index 95a54bd103b..fec6b2c8fcb 100644 --- a/source/_integrations/homekit.markdown +++ b/source/_integrations/homekit.markdown @@ -455,7 +455,7 @@ The key name will be available in the event data in the `key_name` field. Exampl ```yaml automation: triggers: - platform: event + trigger: event event_type: homekit_tv_remote_key_pressed event_data: key_name: arrow_right @@ -475,7 +475,7 @@ The HomeKit integration emits `homekit_state_change` events. These events can be # Example for handling a HomeKit event automation: triggers: - - platform: event + - trigger: event event_type: homekit_state_change event_data: entity_id: cover.garage_door diff --git a/source/_integrations/homematic.markdown b/source/_integrations/homematic.markdown index c2b6253a7ce..1b090589362 100644 --- a/source/_integrations/homematic.markdown +++ b/source/_integrations/homematic.markdown @@ -253,7 +253,7 @@ Here's an example of how to use these events for automations: ```yaml automation: triggers: - platform: event + trigger: event event_type: homematic.keypress event_data: name: "Kitchen Switch" @@ -489,7 +489,7 @@ template: automation: - alias: "Homematic Reconnect" triggers: - platform: state + trigger: state entity_id: binary_sensor.homematic_is_sending_updates to: "off" actions: @@ -535,7 +535,7 @@ automation: automation: - alias: "Homematic CCU Reboot" triggers: - platform: state + trigger: state entity_id: sensor.v_last_reboot actions: action: homematic.reconnect diff --git a/source/_integrations/honeywell.markdown b/source/_integrations/honeywell.markdown index a873271e758..425a0607073 100644 --- a/source/_integrations/honeywell.markdown +++ b/source/_integrations/honeywell.markdown @@ -56,7 +56,7 @@ Due to the instability of the Honeywell total connect system, actions within aut alias: "No one home" description: "Everyone has left home" triggers: - - platform: numeric_state + - trigger: numeric_state entity_id: zone.home for: minutes: 10 diff --git a/source/_integrations/html5.markdown b/source/_integrations/html5.markdown index c6de38cad59..1e5ef102bcb 100644 --- a/source/_integrations/html5.markdown +++ b/source/_integrations/html5.markdown @@ -108,7 +108,7 @@ Example of adding a tag to your notification. This won't create new notification ```yaml - alias: "Push/update notification of sensor state with tag" triggers: - - platform: state + - trigger: state entity_id: sensor.sensor actions: action: notify.html5 @@ -208,7 +208,7 @@ notification is received on the device. ```yaml - alias: "HTML5 push notification received and displayed on device" triggers: - platform: event + trigger: event event_type: html5_notification.received ``` @@ -219,7 +219,7 @@ You will receive an event named `html5_notification.clicked` when the notificati ```yaml - alias: "HTML5 push notification clicked" triggers: - platform: event + trigger: event event_type: html5_notification.clicked ``` @@ -228,7 +228,7 @@ or ```yaml - alias: "HTML5 push notification action button clicked" triggers: - platform: event + trigger: event event_type: html5_notification.clicked event_data: action: open_door @@ -241,7 +241,7 @@ You will receive an event named `html5_notification.closed` when the notificatio ```yaml - alias: "HTML5 push notification clicked" triggers: - platform: event + trigger: event event_type: html5_notification.closed ``` diff --git a/source/_integrations/humidifier.markdown b/source/_integrations/humidifier.markdown index 5bd2f00406c..7798a5297c8 100644 --- a/source/_integrations/humidifier.markdown +++ b/source/_integrations/humidifier.markdown @@ -70,7 +70,7 @@ Set mode for the humidifier device. This action is only available if the device ```yaml automation: triggers: - - platform: time + - trigger: time at: "07:15:00" actions: - action: humidifier.set_mode @@ -94,7 +94,7 @@ Set target humidity of the humidifier device ```yaml automation: triggers: - - platform: time + - trigger: time at: "07:15:00" actions: - action: humidifier.set_humidity diff --git a/source/_integrations/hunterdouglas_powerview.markdown b/source/_integrations/hunterdouglas_powerview.markdown index 4f69ec6231b..91e10d4e7a0 100644 --- a/source/_integrations/hunterdouglas_powerview.markdown +++ b/source/_integrations/hunterdouglas_powerview.markdown @@ -225,7 +225,7 @@ Velocity controls the speed of the shade. The default speed from Hunter Douglas ``` yaml alias: "Blinds closed at night" triggers: - platform: time + trigger: time at: "18:00:00" actions: - action: scene.turn_on @@ -242,7 +242,7 @@ alias: Force Update description: 'Update the position of defined shades' mode: single triggers: - - platform: time_pattern + - trigger: time_pattern hours: '1' actions: - action: homeassistant.update_entity diff --git a/source/_integrations/hyperion.markdown b/source/_integrations/hyperion.markdown index b4c062e3741..83a48592d39 100644 --- a/source/_integrations/hyperion.markdown +++ b/source/_integrations/hyperion.markdown @@ -114,7 +114,7 @@ automation: - id: one alias: "Turn Hyperion effect on when light goes on" triggers: - - platform: state + - trigger: state entity_id: light.hyperion to: "on" actions: @@ -130,13 +130,13 @@ To have the lights playing an effect when pausing, idle or turn off a media play ```yaml - alias: "Set hyperion effect after playback" triggers: - - platform: state + - trigger: state entity_id: media_player.plex to: "off" - - platform: state + - trigger: state entity_id: media_player.plex.plex to: "paused" - - platform: state + - trigger: state entity_id: media_player.plex.plex to: "idle" actions: @@ -152,7 +152,7 @@ To capture the screen on a USB capture device, when playing something on a media ```yaml - alias: "Set hyperion when playback starts" triggers: - - platform: state + - trigger: state entity_id: media_player.plex to: "playing" actions: @@ -166,7 +166,7 @@ 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" triggers: - - platform: state + - trigger: state entity_id: - light.hyperion from: "off" diff --git a/source/_integrations/ibeacon.markdown b/source/_integrations/ibeacon.markdown index 9144fccefa5..af7636f0263 100644 --- a/source/_integrations/ibeacon.markdown +++ b/source/_integrations/ibeacon.markdown @@ -93,14 +93,14 @@ To get the Estimated distance sensor to work, in most cases, it has to be calibr alias: "The black trash can has left the building" mode: single triggers: - - platform: state + - trigger: state entity_id: sensor.black_trash_bin_estimated_distance to: "unavailable" for: hours: 0 minutes: 5 seconds: 0 - - platform: numeric_state + - trigger: numeric_state entity_id: sensor.black_trash_bin_estimated_distance for: hours: 0 diff --git a/source/_integrations/ifttt.markdown b/source/_integrations/ifttt.markdown index c5abbb053af..346a1acc6e1 100644 --- a/source/_integrations/ifttt.markdown +++ b/source/_integrations/ifttt.markdown @@ -39,7 +39,7 @@ automation: - id: this_is_the_automation_id alias: "The optional automation alias" triggers: - - platform: event + - trigger: 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 @@ -144,7 +144,7 @@ Add the *Then That* action. The below example sends a notification to the IFTTT automation: alias: "Startup Notification" triggers: - platform: homeassistant + trigger: homeassistant event: start actions: action: ifttt.trigger @@ -162,7 +162,7 @@ IFTTT can also be used in scripts and with templates. Here is the above automati automation: alias: "Startup Notification" triggers: - platform: homeassistant + trigger: homeassistant event: start actions: action: script.ifttt_notify diff --git a/source/_integrations/image_processing.markdown b/source/_integrations/image_processing.markdown index 8d5d10087d1..bf4dbed8d0d 100644 --- a/source/_integrations/image_processing.markdown +++ b/source/_integrations/image_processing.markdown @@ -35,7 +35,7 @@ The `found_plate` event is triggered after OpenALPR has found a new license plat automation: - alias: "Open garage door" triggers: - platform: event + trigger: event event_type: image_processing.found_plate event_data: entity_id: openalpr.camera_garage_1 @@ -56,7 +56,7 @@ The `detect_face` event is triggered after a Face entity has found a face. automation: - alias: "Known person in front of my door" triggers: - platform: event + trigger: event event_type: image_processing.detect_face event_data: entity_id: image_processing.door @@ -79,7 +79,7 @@ sensor: automation: - alias: "Scan for faces when motion detected" triggers: - - platform: state + - trigger: state entity_id: sensor.door_motion_sensor to: "on" actions: diff --git a/source/_integrations/imap.markdown b/source/_integrations/imap.markdown index df85cf2cf42..595199419a6 100644 --- a/source/_integrations/imap.markdown +++ b/source/_integrations/imap.markdown @@ -146,7 +146,7 @@ Increasing the default maximum message size (2048 bytes) could have a negative i ```yaml template: - triggers: - - platform: event + - trigger: event event_type: "imap_content" id: "custom_event" sensor: @@ -197,7 +197,7 @@ The example below filters the event trigger by `entry_id`, fetches the message a alias: imap fetch and seen example description: Fetch and mark an incoming message as seen triggers: - - platform: event + - trigger: event event_type: imap_content event_data: entry_id: 91fadb3617c5a3ea692aeb62d92aa869 @@ -232,7 +232,7 @@ The following example shows the usage of the IMAP email content sensor to scan t ```yaml template: - triggers: - - platform: event + - trigger: event event_type: "imap_content" id: "custom_event" event_data: @@ -270,7 +270,7 @@ Below is the template sensor which extracts the information from the body of the ```yaml template: - triggers: - - platform: event + - trigger: event event_type: "imap_content" id: "custom_event" event_data: @@ -319,7 +319,7 @@ The example below will only set the state to the subject of the email of templat ```yaml template: - triggers: - - platform: event + - trigger: event event_type: "imap_content" id: "custom_event" event_data: diff --git a/source/_integrations/incomfort.markdown b/source/_integrations/incomfort.markdown index 6a0a0c6eb53..e07c7c088a5 100644 --- a/source/_integrations/incomfort.markdown +++ b/source/_integrations/incomfort.markdown @@ -49,7 +49,7 @@ To send an alert if the CV pressure is too low or too high, consider the followi ```yaml - alias: "Low CV Pressure Alert" triggers: - platform: numeric_state + trigger: numeric_state entity_id: sensor.cv_pressure below: 1.0 actions: diff --git a/source/_integrations/input_boolean.markdown b/source/_integrations/input_boolean.markdown index 22c4e41cc58..c1c2c624f02 100644 --- a/source/_integrations/input_boolean.markdown +++ b/source/_integrations/input_boolean.markdown @@ -89,7 +89,7 @@ will only occur if the `input_boolean` is on. automation: alias: "Arriving home" triggers: - - platform: state + - trigger: state entity_id: binary_sensor.motion_garage to: "on" conditions: diff --git a/source/_integrations/input_button.markdown b/source/_integrations/input_button.markdown index 58d47a8a537..4b583a0d04b 100644 --- a/source/_integrations/input_button.markdown +++ b/source/_integrations/input_button.markdown @@ -68,7 +68,7 @@ means we can use it in our automations. For example: ```yaml triggers: - - platform: state + - trigger: state entity_id: input_button.my_button actions: - action: notify.frenck diff --git a/source/_integrations/input_datetime.markdown b/source/_integrations/input_datetime.markdown index bd6b7963b49..55947610956 100644 --- a/source/_integrations/input_datetime.markdown +++ b/source/_integrations/input_datetime.markdown @@ -118,7 +118,7 @@ automation: # Turns on bedroom light at the time specified. automation: triggers: - platform: time + trigger: time at: input_datetime.bedroom_alarm_clock_time actions: action: light.turn_on diff --git a/source/_integrations/input_number.markdown b/source/_integrations/input_number.markdown index 1221f5d2d9f..ba1e4c4cc26 100644 --- a/source/_integrations/input_number.markdown +++ b/source/_integrations/input_number.markdown @@ -128,7 +128,7 @@ input_number: automation: - alias: "Bedroom Light - Adjust Brightness" triggers: - platform: state + trigger: state entity_id: input_number.bedroom_brightness actions: - action: light.turn_on @@ -167,7 +167,7 @@ input_number: automation: - alias: "Bedroom Light - Custom" triggers: - platform: state + trigger: state entity_id: input_select.scene_bedroom to: CUSTOM actions: @@ -200,7 +200,7 @@ input_number: automation: - alias: "Set temp slider" triggers: - platform: mqtt + trigger: mqtt topic: "setTemperature" actions: action: input_number.set_value @@ -213,7 +213,7 @@ automation: # It publishes its value to the same MQTT topic it is also subscribed to. - alias: "Temp slider moved" triggers: - platform: state + trigger: state entity_id: input_number.target_temp actions: action: mqtt.publish @@ -251,7 +251,7 @@ input_number: automation: - alias: "turn something off after x time after turning it on" triggers: - platform: state + trigger: state entity_id: switch.something to: "on" actions: diff --git a/source/_integrations/input_select.markdown b/source/_integrations/input_select.markdown index c6ef2d6a3b1..30c253bedfc 100644 --- a/source/_integrations/input_select.markdown +++ b/source/_integrations/input_select.markdown @@ -136,7 +136,7 @@ The following example shows the usage of the `input_select.select_option` action automation: - alias: "example automation" triggers: - platform: event + trigger: event event_type: MY_CUSTOM_EVENT actions: - action: input_select.select_option @@ -153,7 +153,7 @@ To dynamically set the `input_select` options you can call `input_select.set_opt automation: - alias: "example automation" triggers: - platform: event + trigger: event event_type: MY_CUSTOM_EVENT actions: - action: input_select.set_options @@ -186,7 +186,7 @@ input_select: # 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" triggers: - platform: mqtt + trigger: mqtt topic: "thermostatMode" # entity_id: input_select.thermostat_mode actions: @@ -200,7 +200,7 @@ input_select: # It publishes its value to the same MQTT topic it is also subscribed to. - alias: "Set Thermostat Mode" triggers: - platform: state + trigger: state entity_id: input_select.thermostat_mode actions: action: mqtt.publish diff --git a/source/_integrations/input_text.markdown b/source/_integrations/input_text.markdown index 1224a7724c3..eb2b9f528ca 100644 --- a/source/_integrations/input_text.markdown +++ b/source/_integrations/input_text.markdown @@ -130,7 +130,7 @@ input_text: automation: - alias: "Bedroom Light - Custom" triggers: - platform: state + trigger: state entity_id: input_select.scene_bedroom actions: - action: input_text.set_value diff --git a/source/_integrations/insteon.markdown b/source/_integrations/insteon.markdown index 9130a463448..aa430a97b7a 100644 --- a/source/_integrations/insteon.markdown +++ b/source/_integrations/insteon.markdown @@ -158,7 +158,7 @@ automation: - id: light_on alias: "Turn a light on" triggers: - - platform: event + - trigger: event event_type: insteon.button_on event_data: address: 1a2b3c @@ -176,7 +176,7 @@ automation: - id: light_off alias: "Turn a light off" triggers: - - platform: event + - trigger: event event_type: insteon.button_on event_data: address: 1a2b3c diff --git a/source/_integrations/isy994.markdown b/source/_integrations/isy994.markdown index b056a960e7c..a4b0d742724 100644 --- a/source/_integrations/isy994.markdown +++ b/source/_integrations/isy994.markdown @@ -93,7 +93,7 @@ A Home Assistant `isy994_control` event is emitted for every "control" event in automation: - alias: "turn off living room on double tap lightswitch" triggers: - platform: event + trigger: event event_type: isy994_control event_data: entity_id: light.lr_track_lights_front diff --git a/source/_integrations/kaleidescape.markdown b/source/_integrations/kaleidescape.markdown index b1163888015..51abfe8c939 100644 --- a/source/_integrations/kaleidescape.markdown +++ b/source/_integrations/kaleidescape.markdown @@ -230,7 +230,7 @@ A typical automation might look like the example below, which turns up the light ```yaml - alias: kaleidescape_theater_lights_up triggers: - - platform: state + - trigger: state entity_id: sensor.kaleidescape_theater_media_location from: content actions: diff --git a/source/_integrations/keyboard_remote.markdown b/source/_integrations/keyboard_remote.markdown index b1d9cb4d777..8543001ee7a 100644 --- a/source/_integrations/keyboard_remote.markdown +++ b/source/_integrations/keyboard_remote.markdown @@ -94,7 +94,7 @@ And an automation rule to breathe life into it: automation: alias: "Keyboard all lights on" triggers: - platform: event + trigger: event event_type: keyboard_remote_command_received event_data: device_descriptor: "/dev/input/event0" @@ -125,7 +125,7 @@ Here's an automation example that plays a sound through a media player whenever automation: - alias: "Keyboard Connected" triggers: - platform: event + trigger: event event_type: keyboard_remote_connected actions: - action: media_player.play_media @@ -137,7 +137,7 @@ automation: - alias: "Bluetooth Keyboard Disconnected" triggers: - platform: event + trigger: event event_type: keyboard_remote_disconnected event_data: device_name: "00:58:56:4C:C0:91" diff --git a/source/_integrations/kira.markdown b/source/_integrations/kira.markdown index 230c90f47d7..96baf890a74 100644 --- a/source/_integrations/kira.markdown +++ b/source/_integrations/kira.markdown @@ -213,7 +213,7 @@ Example automation using these IR codes to toggle a Sonoff plug. description: Turn on sonoff s20 relay triggers: - entity_id: sensor.kira_wireless - platform: state + trigger: state to: PanaOne conditions: [] actions: @@ -226,7 +226,7 @@ Example automation using these IR codes to toggle a Sonoff plug. description: Turn off sonoff s20 relay triggers: - entity_id: sensor.kira_wireless - platform: state + trigger: state to: PanaTwo conditions: [] actions: diff --git a/source/_integrations/knx.markdown b/source/_integrations/knx.markdown index fdf3bbab02b..9c9bd288873 100644 --- a/source/_integrations/knx.markdown +++ b/source/_integrations/knx.markdown @@ -244,7 +244,7 @@ Example automation configuration - alias: Single group address trigger description: '' triggers: - - platform: knx.telegram + - trigger: knx.telegram destination: 1/2/3 group_value_read: false outgoing: false @@ -369,7 +369,7 @@ address: # Example automation to update a cover position after 10 seconds of movement initiation automation: - triggers: - - platform: knx.telegram + - trigger: knx.telegram # Cover move trigger destination: "0/4/20" actions: @@ -380,7 +380,7 @@ automation: address: "0/4/21" - triggers: - - platform: homeassistant + - trigger: homeassistant event: start actions: # Register the group address to trigger a knx_event @@ -596,7 +596,7 @@ Let's pretend you have a binary sensor with the name `Livingroom.Switch` and you # Example automation.yaml entry automation: - triggers: - platform: numeric_state + trigger: numeric_state entity_id: binary_sensor.livingroom_switch attribute: counter above: 0 @@ -609,7 +609,7 @@ automation: - entity_id: light.hue_color_lamp_1 action: light.turn_on - triggers: - platform: numeric_state + trigger: numeric_state entity_id: binary_sensor.livingroom_switch attribute: counter above: 1 diff --git a/source/_integrations/kodi.markdown b/source/_integrations/kodi.markdown index 35579b2a021..45e7bba2cdb 100644 --- a/source/_integrations/kodi.markdown +++ b/source/_integrations/kodi.markdown @@ -46,7 +46,7 @@ automation: - id: kodi_turn_on alias: "Kodi: turn on" triggers: - - platform: device + - trigger: device device_id: !secret kodi_device_id domain: kodi entity_id: media_player.kodi @@ -57,7 +57,7 @@ automation: - id: kodi_turn_off alias: "Kodi: turn off" triggers: - - platform: device + - trigger: device device_id: !secret kodi_device_id domain: kodi entity_id: media_player.kodi @@ -435,7 +435,7 @@ alias: Kodi keypress mode: parallel max: 10 triggers: - - platform: event + - trigger: event event_type: kodi_keypress event_data: entity_id: media_player.kodi_livingroom diff --git a/source/_integrations/lametric.markdown b/source/_integrations/lametric.markdown index be2f71c5d1b..b8ef5b65509 100644 --- a/source/_integrations/lametric.markdown +++ b/source/_integrations/lametric.markdown @@ -165,7 +165,7 @@ To add a notification sound, icon, cycles, or priority override, ```yaml - alias: "Send notification on arrival at school" triggers: - platform: state + trigger: state entity_id: device_tracker.tom_mobile from: "not_home" to: "school" diff --git a/source/_integrations/landisgyr_heat_meter.markdown b/source/_integrations/landisgyr_heat_meter.markdown index 8d66dd48cb6..f902cd05615 100644 --- a/source/_integrations/landisgyr_heat_meter.markdown +++ b/source/_integrations/landisgyr_heat_meter.markdown @@ -77,7 +77,7 @@ If you're comfortable with YAML, this code could be used: ```yaml alias: "Heat Meter manual update" triggers: - - platform: time + - trigger: time at: "23:30:00" actions: - action: homeassistant.update_entity diff --git a/source/_integrations/lcn.markdown b/source/_integrations/lcn.markdown index 9e392c3b9f9..6ebef5218c5 100644 --- a/source/_integrations/lcn.markdown +++ b/source/_integrations/lcn.markdown @@ -163,7 +163,7 @@ Trigger on a transponder event and ensure that the received code is in the given ```yaml automation: triggers: - - platform: event + - trigger: event event_type: lcn_transponder condition: "{{ trigger.event.data.code in ['aabbcc', 'ddeeff', '112233'] }}" actions: @@ -246,7 +246,7 @@ receiver hardware is connected to module 7 in segment 0. ```yaml automation: triggers: - - platform: event + - trigger: event event_type: lcn_transmitter event_data: segment_id: 0 @@ -271,7 +271,7 @@ any hardware module. ```yaml automation: triggers: - - platform: event + - trigger: event event_type: lcn_transponder event_data: code: 123abc @@ -293,7 +293,7 @@ any hardware module. ```yaml automation: triggers: - - platform: event + - trigger: event event_type: lcn_fingerprint event_data: code: 123abc @@ -315,7 +315,7 @@ any hardware module. ```yaml automation: triggers: - - platform: event + - trigger: event event_type: lcn_codelock event_data: code: 123abc @@ -338,7 +338,7 @@ key `a1`. ```yaml automation: triggers: - - platform: event + - trigger: event event_type: lcn_send_keys event_data: key: a1 diff --git a/source/_integrations/lg_netcast.markdown b/source/_integrations/lg_netcast.markdown index bcac042ea38..88d1e6a680e 100644 --- a/source/_integrations/lg_netcast.markdown +++ b/source/_integrations/lg_netcast.markdown @@ -40,7 +40,7 @@ wake_on_lan: # enables `wake_on_lan` integration automation: - alias: "Turn On Living Room TV with WakeOnLan" triggers: - - platform: lg_netcast.turn_on + - trigger: lg_netcast.turn_on entity_id: media_player.lg_netcast_smart_tv actions: - action: wake_on_lan.send_magic_packet diff --git a/source/_integrations/light.markdown b/source/_integrations/light.markdown index 1dc8715f15b..ff9a357f75f 100644 --- a/source/_integrations/light.markdown +++ b/source/_integrations/light.markdown @@ -80,7 +80,7 @@ automation: - id: one alias: "Turn on light when motion is detected" triggers: - - platform: state + - trigger: state entity_id: binary_sensor.motion_1 to: "on" actions: @@ -97,7 +97,7 @@ automation: alias: "Stair morning on" triggers: - at: '05:00' - platform: time + trigger: time actions: - action: light.turn_on target: diff --git a/source/_integrations/lirc.markdown b/source/_integrations/lirc.markdown index a73a29c4797..8d61c5c4ae0 100644 --- a/source/_integrations/lirc.markdown +++ b/source/_integrations/lirc.markdown @@ -85,7 +85,7 @@ The LIRC integration fires `ir_command_received` events on the bus. You can capt automation: - alias: "Off on Remote" triggers: - platform: event + trigger: event event_type: ir_command_received event_data: button_name: KEY_0 diff --git a/source/_integrations/lutron.markdown b/source/_integrations/lutron.markdown index 5d4a13a0c29..b089e3a3954 100644 --- a/source/_integrations/lutron.markdown +++ b/source/_integrations/lutron.markdown @@ -75,7 +75,7 @@ Any configured Powr Savr occupancy sensors will be added as occupancy binary sen ``` yaml - alias: "keypad button pressed notification" triggers: - - platform: event + - trigger: event event_type: lutron_event event_data: id: office_pico_on diff --git a/source/_integrations/mailgun.markdown b/source/_integrations/mailgun.markdown index 177a96c5bca..a11f9579daa 100644 --- a/source/_integrations/mailgun.markdown +++ b/source/_integrations/mailgun.markdown @@ -54,7 +54,7 @@ You can then consume that information with the following automation: ```yaml automation: triggers: - platform: event + trigger: event event_type: mailgun_message_received event_data: action: call_service @@ -103,7 +103,7 @@ The following automation reacts to an event by sending out an email with two att # Example automation using Mailgun notifications automation: triggers: - platform: event + trigger: event event_type: SPECIAL_EVENT actions: action: notify.mailgun diff --git a/source/_integrations/manual.markdown b/source/_integrations/manual.markdown index b7b3374820b..6d1e41f93aa 100644 --- a/source/_integrations/manual.markdown +++ b/source/_integrations/manual.markdown @@ -176,16 +176,16 @@ Using sensors to trigger the alarm. automation: - alias: 'Trigger alarm while armed away' triggers: - - platform: state + - trigger: state entity_id: sensor.pir1 to: "active" - - platform: state + - trigger: state entity_id: sensor.pir2 to: "active" - - platform: state + - trigger: state entity_id: sensor.door to: "open" - - platform: state + - trigger: state entity_id: sensor.window to: "open" conditions: @@ -204,7 +204,7 @@ Sending a notification when the alarm is triggered. automation: - alias: 'Send notification when alarm triggered' triggers: - - platform: state + - trigger: state entity_id: alarm_control_panel.home_alarm to: "triggered" actions: @@ -219,7 +219,7 @@ Disarming the alarm when the door is properly unlocked. automation: - alias: 'Disarm alarm when door unlocked by keypad' triggers: - - platform: state + - trigger: state entity_id: sensor.front_door_lock_alarm_type to: "19" # many z-wave locks use Alarm Type 19 for 'Unlocked by Keypad' @@ -236,7 +236,7 @@ Sending a Notification when the Alarm is Armed (Away/Home), Disarmed and in Pend ```yaml - alias: 'Send notification when alarm is Disarmed' triggers: - - platform: state + - trigger: state entity_id: alarm_control_panel.home_alarm to: "disarmed" actions: @@ -248,7 +248,7 @@ Sending a Notification when the Alarm is Armed (Away/Home), Disarmed and in Pend ```yaml - alias: 'Send notification when alarm is in pending status' triggers: - - platform: state + - trigger: state entity_id: alarm_control_panel.home_alarm to: "pending" actions: @@ -260,7 +260,7 @@ 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' triggers: - - platform: state + - trigger: state entity_id: alarm_control_panel.home_alarm to: "armed_away" actions: @@ -272,7 +272,7 @@ 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' triggers: - - platform: state + - trigger: state entity_id: alarm_control_panel.home_alarm to: "armed_home" actions: diff --git a/source/_integrations/matrix.markdown b/source/_integrations/matrix.markdown index dad0c5be511..c71c2124f5b 100644 --- a/source/_integrations/matrix.markdown +++ b/source/_integrations/matrix.markdown @@ -130,7 +130,7 @@ notify: automation: - alias: 'React to !testword' triggers: - platform: event + trigger: event event_type: matrix_command event_data: command: testword @@ -140,7 +140,7 @@ automation: message: "It looks like you wrote !testword" - alias: 'React to an introduction' triggers: - platform: event + trigger: event event_type: matrix_command event_data: command: introduction diff --git a/source/_integrations/mealie.markdown b/source/_integrations/mealie.markdown index d189e8d7e94..4ecf532504f 100644 --- a/source/_integrations/mealie.markdown +++ b/source/_integrations/mealie.markdown @@ -133,7 +133,7 @@ Example template sensor that contains today's dinner meal plan entries: ```yaml template: - triggers: - - platform: time_pattern + - trigger: time_pattern hours: /1 actions: - action: mealie.get_mealplan diff --git a/source/_integrations/meteoalarm.markdown b/source/_integrations/meteoalarm.markdown index 04d39f53638..1780cd1f568 100644 --- a/source/_integrations/meteoalarm.markdown +++ b/source/_integrations/meteoalarm.markdown @@ -92,7 +92,7 @@ Example automation automation: - alias: "Alert me about weather warnings" triggers: - platform: state + trigger: state entity_id: binary_sensor.meteoalarm from: 'off' actions: diff --git a/source/_integrations/minio.markdown b/source/_integrations/minio.markdown index c233f6d8763..16af015f810 100644 --- a/source/_integrations/minio.markdown +++ b/source/_integrations/minio.markdown @@ -89,7 +89,7 @@ Automations can be triggered on new files created on the Minio server using the automation: - alias: "Upload camera snapshot" triggers: - platform: event + trigger: event event_type: folder_watcher event_data: event_type: created @@ -107,7 +107,7 @@ automation: - alias: "Download new Minio file" triggers: - - platform: event + - trigger: event event_type: minio conditions: [] diff --git a/source/_integrations/modem_callerid.markdown b/source/_integrations/modem_callerid.markdown index cac82270cb3..81b7dc756ec 100644 --- a/source/_integrations/modem_callerid.markdown +++ b/source/_integrations/modem_callerid.markdown @@ -41,7 +41,7 @@ An example automation: automation: - alias: Notify CallerID triggers: - platform: state + trigger: state entity_id: sensor.phone_modem to: "callerid" actions: @@ -50,7 +50,7 @@ automation: message: "Call from {{ state_attr('sensor.phone_modem', 'cid_name') }} at {{ state_attr('sensor.phone_modem', 'cid_number') }} " - alias: Notify CallerID webui triggers: - platform: state + trigger: state entity_id: sensor.phone_modem to: "callerid" actions: @@ -60,7 +60,7 @@ automation: 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 triggers: - platform: state + trigger: state entity_id: sensor.phone_modem to: "callerid" actions: diff --git a/source/_integrations/motion_blinds.markdown b/source/_integrations/motion_blinds.markdown index 48f19b124e2..542467567b8 100644 --- a/source/_integrations/motion_blinds.markdown +++ b/source/_integrations/motion_blinds.markdown @@ -215,7 +215,7 @@ Example YAML automation for custom polling interval (every minute): alias: Motionblinds polling automation mode: single triggers: - - platform: time_pattern + - trigger: time_pattern minutes: "/1" actions: - action: homeassistant.update_entity diff --git a/source/_integrations/motionblinds_ble.markdown b/source/_integrations/motionblinds_ble.markdown index 9c5669a1fd4..f0b55e0fc82 100644 --- a/source/_integrations/motionblinds_ble.markdown +++ b/source/_integrations/motionblinds_ble.markdown @@ -63,7 +63,7 @@ This can also be automated using a YAML automation. For instance, the following alias: Motionblinds Bluetooth polling automation mode: single triggers: - - platform: time_pattern + - trigger: time_pattern hours: "/24" actions: - action: homeassistant.update_entity diff --git a/source/_integrations/motioneye.markdown b/source/_integrations/motioneye.markdown index a695e9d22cf..512fb2cbc09 100644 --- a/source/_integrations/motioneye.markdown +++ b/source/_integrations/motioneye.markdown @@ -352,7 +352,7 @@ must be switched on for this automation to work (controllable via `switch. ```yaml - alias: "Set camera text overlay to armed" triggers: - - platform: state + - trigger: state entity_id: alarm_control_panel.home_alarm to: "armed_away" actions: @@ -365,7 +365,7 @@ must be switched on for this automation to work (controllable via `switch. - alias: "Set camera text overlay to disarmed" triggers: - - platform: state + - trigger: state entity_id: alarm_control_panel.home_alarm to: "disarmed" actions: @@ -386,7 +386,7 @@ An automation to cast stored movie clips to a TV as they arrive. ```yaml - alias: "Cast motionEye movie clips" triggers: - - platform: event + - trigger: event event_type: motioneye.file_stored event_data: # Only cast video. diff --git a/source/_integrations/mqtt.markdown b/source/_integrations/mqtt.markdown index e70e0f3b222..ce107239ace 100644 --- a/source/_integrations/mqtt.markdown +++ b/source/_integrations/mqtt.markdown @@ -1063,7 +1063,7 @@ Use as [`script`](/integrations/script/) in automations. automation: alias: "Send me a message when I get home" triggers: - platform: state + trigger: state entity_id: device_tracker.me to: "home" actions: diff --git a/source/_integrations/netatmo.markdown b/source/_integrations/netatmo.markdown index 8e9c16922d2..224f6ceb4fc 100644 --- a/source/_integrations/netatmo.markdown +++ b/source/_integrations/netatmo.markdown @@ -207,7 +207,7 @@ Example: triggers: - event_data: {} event_type: netatmo_event - platform: event + trigger: event actions: - data: {} entity_id: counter.event_counter @@ -224,7 +224,7 @@ Example: description: "Motion detected at home" triggers: - event_type: netatmo_event - platform: event + trigger: event event_data: type: movement actions: @@ -248,7 +248,7 @@ Example: description: "Motion detected at home" triggers: - event_type: netatmo_event - platform: event + trigger: event event_data: type: human # other possible types: animal, vehicle actions: @@ -272,15 +272,15 @@ Example: description: "Notifies which door or window is open or was moved" triggers: - event_type: netatmo_event - platform: event + trigger: event event_data: type: tag_open - event_type: netatmo_event - platform: event + trigger: event event_data: type: tag_big_move - event_type: netatmo_event - platform: event + trigger: event event_data: type: tag_small_move actions: diff --git a/source/_integrations/netgear_lte.markdown b/source/_integrations/netgear_lte.markdown index 7ae95d1ef9e..6cf806cab25 100644 --- a/source/_integrations/netgear_lte.markdown +++ b/source/_integrations/netgear_lte.markdown @@ -99,7 +99,7 @@ The following automation example processes incoming SMS messages with the [Conve automation: - alias: "SMS conversation" triggers: - - platform: event + - trigger: event event_type: netgear_lte_sms actions: - action: conversation.process diff --git a/source/_integrations/nightscout.markdown b/source/_integrations/nightscout.markdown index 19af8fb9c43..ac49d80a254 100644 --- a/source/_integrations/nightscout.markdown +++ b/source/_integrations/nightscout.markdown @@ -35,7 +35,7 @@ The state is the last reading from Nightscout, and you can see other information alias: "overnight_low_kitchen_lights" description: Turn on the lights in the kitchen if my blood sugar drops low overnight triggers: - - platform: numeric_state + - trigger: numeric_state entity_id: sensor.blood_glucose below: "65" conditions: diff --git a/source/_integrations/nissan_leaf.markdown b/source/_integrations/nissan_leaf.markdown index 570e1c36aa4..9628acf1717 100644 --- a/source/_integrations/nissan_leaf.markdown +++ b/source/_integrations/nissan_leaf.markdown @@ -113,7 +113,7 @@ You can also use the `nissan_leaf.update` action to request an on-demand update. alias: "Update when driver not home" initial_state: on triggers: - - platform: time_pattern + - trigger: time_pattern minutes: "/30" conditions: - condition: state diff --git a/source/_integrations/nzbget.markdown b/source/_integrations/nzbget.markdown index 52371704bf0..1dca6b3bd2c 100644 --- a/source/_integrations/nzbget.markdown +++ b/source/_integrations/nzbget.markdown @@ -52,7 +52,7 @@ Example automation to send a Telegram message on a completed download: ```yaml - alias: "Completed Torrent" triggers: - platform: event + trigger: event event_type: nzbget_download_complete - event_data: category: tv diff --git a/source/_integrations/openai_conversation.markdown b/source/_integrations/openai_conversation.markdown index b2a633d35fd..a5128d435d8 100644 --- a/source/_integrations/openai_conversation.markdown +++ b/source/_integrations/openai_conversation.markdown @@ -130,7 +130,7 @@ Select **YAML Mode** to reveal the *config_entry* value to be used in the below automation: - alias: "Update image when weather changes" triggers: - - platform: state + - trigger: state entity_id: weather.home actions: - alias: "Ask OpenAI to generate an image" @@ -150,7 +150,7 @@ automation: template: - triggers: alias: "Update image when a new weather image is generated" - platform: event + trigger: event event_type: new_weather_image image: name: "AI generated image of New York" diff --git a/source/_integrations/opensky.markdown b/source/_integrations/opensky.markdown index 54e0b1d1003..58cb0237a0a 100644 --- a/source/_integrations/opensky.markdown +++ b/source/_integrations/opensky.markdown @@ -60,7 +60,7 @@ To receive notifications of the entering flights using the [Home Assistant Compa automation: - alias: "Flight entry notification" triggers: - platform: event + trigger: event event_type: opensky_entry actions: action: notify.mobile_app_ @@ -77,7 +77,7 @@ One can also get a direct link to the OpenSky website to see the flight using th automation: - alias: "Flight entry notification" triggers: - platform: event + trigger: event event_type: opensky_entry actions: action: notify.mobile_app_ diff --git a/source/_integrations/openuv.markdown b/source/_integrations/openuv.markdown index 6625b2d486e..3d0ddfa24c6 100644 --- a/source/_integrations/openuv.markdown +++ b/source/_integrations/openuv.markdown @@ -102,7 +102,7 @@ horizon: automation: - alias: "Update OpenUV" triggers: - platform: time_pattern + trigger: time_pattern minutes: "/20" conditions: condition: numeric_state @@ -122,7 +122,7 @@ Update the protection window once a day at 12:00pm: automation: - alias: "Update OpenUV" triggers: - platform: time + trigger: time at: "12:00:00" actions: action: homeassistant.update_entity @@ -143,7 +143,7 @@ automation: # 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 + - trigger: time_pattern minutes: "/15" conditions: - condition: sun diff --git a/source/_integrations/persistent_notification.markdown b/source/_integrations/persistent_notification.markdown index a205fab06ab..45685782f9d 100644 --- a/source/_integrations/persistent_notification.markdown +++ b/source/_integrations/persistent_notification.markdown @@ -31,7 +31,7 @@ An example of a persistent notification trigger in YAML: ```yaml automation: - triggers: - - platform: persistent_notification + - trigger: persistent_notification # Optional. Possible values: added, removed, updated, current update_type: - added diff --git a/source/_integrations/plex.markdown b/source/_integrations/plex.markdown index 4e6e81e2478..5e687a892a2 100644 --- a/source/_integrations/plex.markdown +++ b/source/_integrations/plex.markdown @@ -79,13 +79,13 @@ Example automation to use the `last_added_item` attribute on library sensors to ```yaml alias: Plex - New media added triggers: - - platform: state + - trigger: state entity_id: sensor.plex_library_movies id: movie - - platform: state + - trigger: state entity_id: sensor.plex_library_music id: album - - platform: state + - trigger: state entity_id: sensor.plex_library_tv_shows id: episode @@ -117,7 +117,7 @@ play_plex_on_tv: data: source: "Plex" - wait_for_trigger: - - platform: state + - trigger: state entity_id: media_player.smart_tv to: "on" timeout: diff --git a/source/_integrations/point.markdown b/source/_integrations/point.markdown index ab9caecd3fe..d8d7e7d8489 100644 --- a/source/_integrations/point.markdown +++ b/source/_integrations/point.markdown @@ -96,7 +96,7 @@ The following example show how to implement an automation for the **button_press automation: alias: "Point button press" triggers: - - platform: state + - trigger: state entity_id: binary_sensor.point_button_press # Change this accordingly to: "on" actions: @@ -117,7 +117,7 @@ The events shown as [binary sensors](#binary-sensor) are sent to Home Assistant automation: alias: "Point button press (webhook)" triggers: - - platform: event + - trigger: event event_type: point_webhook_received event_data: {} conditions: diff --git a/source/_integrations/qrcode.markdown b/source/_integrations/qrcode.markdown index 5ef7eeb5d29..41f0377a6b0 100644 --- a/source/_integrations/qrcode.markdown +++ b/source/_integrations/qrcode.markdown @@ -53,7 +53,7 @@ An automation using this integration could look like this: automation: - alias: "Catch QR code and arm the alarm system" triggers: - - platform: state + - trigger: state entity_id: image_processing.qr_front_door to: ARM_QR_CODE_VALUE actions: diff --git a/source/_integrations/qwikswitch.markdown b/source/_integrations/qwikswitch.markdown index d00e92d2a98..cc8a7513758 100644 --- a/source/_integrations/qwikswitch.markdown +++ b/source/_integrations/qwikswitch.markdown @@ -109,7 +109,7 @@ QwikSwitch devices (i.e., transmitter buttons) will fire events on the Home Assi automation: - alias: "Action - Respond to A button press" triggers: - platform: event + trigger: event event_type: qwikswitch.button.@12df34 ``` diff --git a/source/_integrations/rainbird.markdown b/source/_integrations/rainbird.markdown index f6c8f400f51..20da8718c75 100644 --- a/source/_integrations/rainbird.markdown +++ b/source/_integrations/rainbird.markdown @@ -77,7 +77,7 @@ zone switch entity and allows a custom duration unlike the switch. automation: - alias: "Turn irrigation on" triggers: - - platform: time + - trigger: time at: "5:30:00" actions: - action: rainbird.start_irrigation diff --git a/source/_integrations/recorder.markdown b/source/_integrations/recorder.markdown index cffa148f034..96b96f7980b 100644 --- a/source/_integrations/recorder.markdown +++ b/source/_integrations/recorder.markdown @@ -236,7 +236,7 @@ The below automation will remove history for `sensor.power_sensor_0` older than ```yaml alias: "Purge noisy power sensors" triggers: - - platform: time + - trigger: time at: "04:15:00" actions: - action: recorder.purge_entities diff --git a/source/_integrations/remember_the_milk.markdown b/source/_integrations/remember_the_milk.markdown index e4e2a4ab2a0..5791645fe20 100644 --- a/source/_integrations/remember_the_milk.markdown +++ b/source/_integrations/remember_the_milk.markdown @@ -93,7 +93,7 @@ Here's an example for an automation that creates a new task whenever `sensor.mys ```yaml - id: mysensor_on triggers: - platform: state + trigger: state entity_id: sensor.mysensor to: on actions: @@ -103,7 +103,7 @@ Here's an example for an automation that creates a new task whenever `sensor.mys id: "{{trigger.entity_id}}" - id: mysensor_off triggers: - platform: state + trigger: state entity_id: sensor.mysensor to: off actions: diff --git a/source/_integrations/rest_command.markdown b/source/_integrations/rest_command.markdown index b6a6d50b185..d8b5b2e9688 100644 --- a/source/_integrations/rest_command.markdown +++ b/source/_integrations/rest_command.markdown @@ -184,7 +184,7 @@ Call the new action from [developer tools](/docs/tools/dev-tools/) in the sideba automation: - alias: "Arrive at Work" triggers: - platform: zone + trigger: zone entity_id: device_tracker.my_device zone: zone.work event: enter diff --git a/source/_integrations/rfxtrx.markdown b/source/_integrations/rfxtrx.markdown index 3564ba37376..15af42102b8 100644 --- a/source/_integrations/rfxtrx.markdown +++ b/source/_integrations/rfxtrx.markdown @@ -296,7 +296,7 @@ So, for example, to trigger an action when somebody presses the doorbell, you wo *Automation trigger:* ```yaml -- platform: event +- trigger: event event_type: rfxtrx_event event_data: packet_type: 22 @@ -321,7 +321,7 @@ scene: automation: - alias: "Use doorbell button to trigger scene" triggers: - - platform: event + - trigger: event event_type: rfxtrx_event event_data: packet_type: 22 diff --git a/source/_integrations/ring.markdown b/source/_integrations/ring.markdown index 0e6f3ad86d6..208e2b19814 100644 --- a/source/_integrations/ring.markdown +++ b/source/_integrations/ring.markdown @@ -87,7 +87,7 @@ Then you can use the following automation, with the entities from your system, w automation: alias: "Save the video when the doorbell is pushed" triggers: - - platform: state + - trigger: state entity_id: binary_sensor.front_doorbell_ding to: "on" actions: diff --git a/source/_integrations/roon.markdown b/source/_integrations/roon.markdown index 82865ca9f0c..a80659ab29a 100644 --- a/source/_integrations/roon.markdown +++ b/source/_integrations/roon.markdown @@ -79,7 +79,7 @@ Here is an example automation using an IR blaster to control `media_player_study alias: Roon Study Volume description: "" triggers: - - platform: state + - trigger: state entity_id: - event.study_roon_volume actions: diff --git a/source/_integrations/samsungtv.markdown b/source/_integrations/samsungtv.markdown index c394485df68..0603b7fe1f7 100644 --- a/source/_integrations/samsungtv.markdown +++ b/source/_integrations/samsungtv.markdown @@ -39,7 +39,7 @@ wake_on_lan: # enables `wake_on_lan` integration automation: - alias: "Turn On Living Room TV with WakeOnLan" triggers: - - platform: samsungtv.turn_on + - trigger: samsungtv.turn_on entity_id: media_player.samsung_smart_tv actions: - action: wake_on_lan.send_magic_packet diff --git a/source/_integrations/satel_integra.markdown b/source/_integrations/satel_integra.markdown index 9161d6a2244..23338a4bd56 100644 --- a/source/_integrations/satel_integra.markdown +++ b/source/_integrations/satel_integra.markdown @@ -173,7 +173,7 @@ For example: ```yaml alias: "Flick the input switch when movement in bedroom detected" triggers: - platform: state + trigger: state entity_id: "binary_sensor.bedroom" to: "on" actions: diff --git a/source/_integrations/scene.markdown b/source/_integrations/scene.markdown index 6fe2a7912eb..fe937b60ba1 100644 --- a/source/_integrations/scene.markdown +++ b/source/_integrations/scene.markdown @@ -102,7 +102,7 @@ Scenes can be activated using the `scene.turn_on` action (there is no `scene.tur # Example automation automation: triggers: - platform: state + trigger: state entity_id: device_tracker.sweetheart from: "not_home" to: "home" @@ -120,7 +120,7 @@ With the `scene.apply` action you are able to apply a scene without first defini # Example automation automation: triggers: - platform: state + trigger: state entity_id: device_tracker.sweetheart from: "not_home" to: "home" @@ -149,7 +149,7 @@ light will transition to the scene in 2.5 seconds. # Example automation automation: triggers: - platform: state + trigger: state entity_id: device_tracker.sweetheart from: "not_home" to: "home" @@ -186,7 +186,7 @@ This video tutorial explains how scenes work and how you can utilize scenes on t # Example automation using entities automation: triggers: - platform: homeassistant + trigger: homeassistant event: start actions: action: scene.create @@ -214,7 +214,7 @@ If the scene was not previously created by `scene.create`, the action will fail # Example automation automation: triggers: - platform: state + trigger: state entity_id: sun.sun to: below_horizon actions: @@ -229,7 +229,7 @@ The following example turns off some entities as soon as a window opens. The sta # Example automation using snapshot - alias: "Window opened" triggers: - - platform: state + - trigger: state entity_id: binary_sensor.window from: "off" to: "on" @@ -251,7 +251,7 @@ The following example turns off some entities as soon as a window opens. The sta hvac_mode: "off" - alias: "Window closed" triggers: - - platform: state + - trigger: state entity_id: binary_sensor.window from: "on" to: "off" diff --git a/source/_integrations/schedule.markdown b/source/_integrations/schedule.markdown index f666cd3394e..6f07dfe1c22 100644 --- a/source/_integrations/schedule.markdown +++ b/source/_integrations/schedule.markdown @@ -150,7 +150,7 @@ A schedule creates an on/off (schedule) sensor within the times set. Using the t ```yaml triggers: - - platform: state + - trigger: state entity_id: - schedule.thermostat_schedule to: "on" @@ -166,7 +166,7 @@ Using the `light_schedule` example from above in an automation might look like t ```yaml triggers: - - platform: state + - trigger: state entity_id: - schedule.light_schedule to: "on" diff --git a/source/_integrations/script.markdown b/source/_integrations/script.markdown index d365dabd205..405595a93d6 100644 --- a/source/_integrations/script.markdown +++ b/source/_integrations/script.markdown @@ -177,7 +177,7 @@ Aside from the automation editor UI, variables can be passed to scripts within t # Example configuration.yaml entry automation: triggers: - platform: state + trigger: state entity_id: light.bedroom from: "off" to: "on" @@ -196,7 +196,7 @@ This example shows using `script.turn_on` action: # Example configuration.yaml entry automation: triggers: - platform: state + trigger: state entity_id: light.bedroom from: "off" to: "on" diff --git a/source/_integrations/shell_command.markdown b/source/_integrations/shell_command.markdown index e8ce442d035..1d37b129c13 100644 --- a/source/_integrations/shell_command.markdown +++ b/source/_integrations/shell_command.markdown @@ -83,7 +83,7 @@ helper and an automation. automation: - alias: "run_set_ac" triggers: - platform: state + trigger: state entity_id: input_number.ac_temperature actions: action: shell_command.set_ac_to_slider diff --git a/source/_integrations/shelly.markdown b/source/_integrations/shelly.markdown index 7dd98efa26d..807fc2e535c 100644 --- a/source/_integrations/shelly.markdown +++ b/source/_integrations/shelly.markdown @@ -200,7 +200,7 @@ You can also create automations using YAML, for example: ```yaml - alias: "Toggle living room light" triggers: - platform: event + trigger: event event_type: shelly.click event_data: device: shellyswitch25-AABBCC @@ -213,7 +213,7 @@ You can also create automations using YAML, for example: - alias: "Toggle living room lamp" triggers: - platform: event + trigger: event event_type: shelly.click event_data: device: shellyswitch25-AABBCC diff --git a/source/_integrations/shopping_list.markdown b/source/_integrations/shopping_list.markdown index 36dfa1363d3..c1a29b36a8d 100644 --- a/source/_integrations/shopping_list.markdown +++ b/source/_integrations/shopping_list.markdown @@ -93,7 +93,7 @@ A `shopping_list_updated` event is triggered when items in the list are modified ```yaml alias: "Notify on new shopping list item" triggers: - - platform: event + - trigger: event event_type: shopping_list_updated event_data: action: "add" diff --git a/source/_integrations/sighthound.markdown b/source/_integrations/sighthound.markdown index 2cb5da17261..13cec68daac 100644 --- a/source/_integrations/sighthound.markdown +++ b/source/_integrations/sighthound.markdown @@ -88,7 +88,7 @@ An example using two automations: description: "Send a camera image to sighthound, when motion is detected at the entrance" triggers: - type: motion - platform: device + trigger: device device_id: YOUR_DEVICE_ID entity_id: binary_sensor.my_motion_sensor domain: binary_sensor @@ -102,7 +102,7 @@ An example using two automations: alias: "Arriving Vehicle Notification" description: "Send a notification to a phone, when a vehicle is detected at the entrance" triggers: - - platform: event + - trigger: event event_type: sighthound.vehicle_detected actions: - action: notify.mobile_app_my_iphone diff --git a/source/_integrations/signal_messenger.markdown b/source/_integrations/signal_messenger.markdown index 72cc1bd854c..dcaaf7251f7 100644 --- a/source/_integrations/signal_messenger.markdown +++ b/source/_integrations/signal_messenger.markdown @@ -164,7 +164,7 @@ You can create an automation as follows: ```yaml ... triggers: - - platform: state + - trigger: state entity_id: - sensor.signal_message_received attribute: source diff --git a/source/_integrations/simplisafe.markdown b/source/_integrations/simplisafe.markdown index 0d47eaef1c2..eb64d82d7ca 100644 --- a/source/_integrations/simplisafe.markdown +++ b/source/_integrations/simplisafe.markdown @@ -147,7 +147,7 @@ For example, the following will trigger when the doorbell rings: ```yaml triggers: - - platform: event + - trigger: event event_type: SIMPLISAFE_EVENT event_data: last_event_type: doorbell_detected diff --git a/source/_integrations/sms.markdown b/source/_integrations/sms.markdown index 308f5d72390..4a9180e8da3 100644 --- a/source/_integrations/sms.markdown +++ b/source/_integrations/sms.markdown @@ -98,7 +98,7 @@ notify_sms_user1: ```yaml - alias: "Forward SMS" triggers: - - platform: event + - trigger: event event_type: sms.incoming_sms actions: - action: script.notify_sms_user1 diff --git a/source/_integrations/snips.markdown b/source/_integrations/snips.markdown index 79f606f7ee4..507a07860a0 100644 --- a/source/_integrations/snips.markdown +++ b/source/_integrations/snips.markdown @@ -248,7 +248,7 @@ Here is a more complex example. The automation is triggered if the garage door i automation: garage_door_has_been_open: triggers: - - platform: state + - trigger: state entity_id: binary_sensor.my_garage_door_sensor from: "off" to: "on" diff --git a/source/_integrations/snooz.markdown b/source/_integrations/snooz.markdown index 06a2781a15b..273abf5a7a3 100644 --- a/source/_integrations/snooz.markdown +++ b/source/_integrations/snooz.markdown @@ -68,7 +68,7 @@ Transition the volume level over the specified duration. If the device is powere ```yaml automation: - triggers: - - platform: time + - trigger: time at: "04:20:00" actions: - action: snooz.transition_on @@ -98,7 +98,7 @@ Once the transition completes, the volume level is restored to the value before ```yaml automation: - triggers: - - platform: time + - trigger: time at: "16:20:00" actions: - action: snooz.transition_off diff --git a/source/_integrations/sonos.markdown b/source/_integrations/sonos.markdown index c71e4e5c2b5..5886e642573 100644 --- a/source/_integrations/sonos.markdown +++ b/source/_integrations/sonos.markdown @@ -398,11 +398,11 @@ Removes an item from the queue. alias: "Remove last played song from queue" id: Remove last played song from queue triggers: - - platform: state + - trigger: state entity_id: media_player.kitchen - - platform: state + - trigger: state entity_id: media_player.bathroom - - platform: state + - trigger: state entity_id: media_player.move conditions: condition: and diff --git a/source/_integrations/spc.markdown b/source/_integrations/spc.markdown index 39641b648fb..fe376503614 100644 --- a/source/_integrations/spc.markdown +++ b/source/_integrations/spc.markdown @@ -60,7 +60,7 @@ The `changed_by` attribute enables one to be able to take different actions depe automation: - alias: "Alarm status changed" triggers: - - platform: state + - trigger: state entity_id: alarm_control_panel.alarm_1 actions: - action: notify.notify diff --git a/source/_integrations/speedtestdotnet.markdown b/source/_integrations/speedtestdotnet.markdown index 4cce63766c3..093c40ea948 100644 --- a/source/_integrations/speedtestdotnet.markdown +++ b/source/_integrations/speedtestdotnet.markdown @@ -51,14 +51,14 @@ In this section you will find some real-life examples of how to use this integra automation: - alias: "Internet Speed Glow Connect Great" triggers: - - platform: template + - trigger: template value_template: "{{ states('sensor.speedtest_download')|float >= 10 }}" actions: - action: shell_command.green - alias: "Internet Speed Glow Connect Poor" triggers: - - platform: template + - trigger: template value_template: "{{ states('sensor.speedtest_download')|float < 10 }}" actions: - action: shell_command.red diff --git a/source/_integrations/sun.markdown b/source/_integrations/sun.markdown index 69a2329388c..715056b6aca 100644 --- a/source/_integrations/sun.markdown +++ b/source/_integrations/sun.markdown @@ -64,7 +64,7 @@ The sun trigger need to have the type 'sun', which event (sunset or sunrise) and ```yaml triggers: - - platform: sun + - trigger: sun event: sunrise offset: "-01:00:01" ``` diff --git a/source/_integrations/system_log.markdown b/source/_integrations/system_log.markdown index 5f5dc1508c3..189c3f65f86 100644 --- a/source/_integrations/system_log.markdown +++ b/source/_integrations/system_log.markdown @@ -91,7 +91,7 @@ counter: automation: - alias: "Count warnings" triggers: - platform: event + trigger: event event_type: system_log_event event_data: level: WARNING @@ -111,7 +111,7 @@ This automation will create a persistent notification whenever an error or warni automation: - alias: "Create notifications for 'action' errors" triggers: - platform: event + trigger: event event_type: system_log_event conditions: condition: template @@ -133,7 +133,7 @@ This automation will create a new log entry when the door is opened: automation: - alias: "Log door opened" triggers: - platform: state + trigger: state entity_id: binary_sensor.door from: "off" to: "on" diff --git a/source/_integrations/tado.markdown b/source/_integrations/tado.markdown index f7ddef4bd6f..c88daa5a530 100644 --- a/source/_integrations/tado.markdown +++ b/source/_integrations/tado.markdown @@ -116,7 +116,7 @@ script: automation: # Trigger if the state of either thermostat changes triggers: - - platform: state + - trigger: state entity_id: - sensor.temp_sensor_room - sensor.tado_temperature @@ -160,7 +160,7 @@ Examples: automation: # Trigger on specified time. triggers: - - platform: time + - trigger: time at: "00:00:00" # Add meter readings from `sensor.gas_consumption` to Tado. diff --git a/source/_integrations/tag.markdown b/source/_integrations/tag.markdown index beb0e01934f..21fa0e84beb 100644 --- a/source/_integrations/tag.markdown +++ b/source/_integrations/tag.markdown @@ -76,7 +76,7 @@ automation: media_content_id: spotify:playlist:0OtWh3u6fZrBJTQtVBQWge media_content_type: playlist triggers: - platform: event + trigger: event event_type: tag_scanned conditions: # Test that we support this device and tag diff --git a/source/_integrations/telegram_bot.markdown b/source/_integrations/telegram_bot.markdown index f914244a035..99dd6aaf43b 100644 --- a/source/_integrations/telegram_bot.markdown +++ b/source/_integrations/telegram_bot.markdown @@ -347,7 +347,7 @@ Simple ping pong example. ```yaml alias: 'Telegram bot that reply pong to ping' triggers: - platform: event + trigger: event event_type: telegram_command event_data: command: "/ping" @@ -361,7 +361,7 @@ An example that shows keyboard interaction with `notify.telegram` ```yaml triggers: - platform: event + trigger: event event_type: telegram_command event_data: command: "/start" @@ -379,7 +379,7 @@ and an automation to trigger a related command "/siren". ```yaml triggers: - platform: event + trigger: event event_type: telegram_command event_data: command: "/siren" @@ -401,7 +401,7 @@ An example to show the use of event_data in action: ```yaml - alias: 'Kitchen Telegram Speak' triggers: - platform: event + trigger: event event_type: telegram_command event_data: command: "/speak" @@ -429,7 +429,7 @@ Text repeater: ```yaml - alias: 'Telegram bot that repeats text' triggers: - platform: event + trigger: event event_type: telegram_text actions: - action: telegram_bot.send_message @@ -452,7 +452,7 @@ Message editor: ```yaml - alias: 'Telegram bot that edits the last sent message' triggers: - platform: event + trigger: event event_type: telegram_callback event_data: command: "/edit_msg" @@ -485,7 +485,7 @@ Keyboard editor: ```yaml - alias: 'Telegram bot that edits the keyboard' triggers: - platform: event + trigger: event event_type: telegram_callback event_data: command: "/remove_button" @@ -511,7 +511,7 @@ Only acknowledges the 'NO' answer: ```yaml - alias: 'Telegram bot that simply acknowledges' triggers: - platform: event + trigger: event event_type: telegram_callback event_data: command: "/do_nothing" @@ -531,7 +531,7 @@ Telegram callbacks also support arguments and commands the same way as normal me ```yaml - alias: 'Telegram bot repeats arguments on callback query' triggers: - platform: event + trigger: event event_type: telegram_callback event_data: command: "/repeat" @@ -554,7 +554,7 @@ Receiving `chat_id` and `message_id` identifiers of sent messages by the `telegr ```yaml - alias: 'Notifications about messages sent by Telegram bot' triggers: - platform: event + trigger: event event_type: telegram_sent event_data: message_tag: "msg_start" diff --git a/source/_integrations/template.markdown b/source/_integrations/template.markdown index bdd30e19bf8..85e077e52ea 100644 --- a/source/_integrations/template.markdown +++ b/source/_integrations/template.markdown @@ -111,7 +111,7 @@ The state, including attributes, of trigger-based sensors and binary sensors is # Example configuration entry template: - triggers: - - platform: time_pattern + - trigger: time_pattern # This will update every night hours: 0 minutes: 0 @@ -502,7 +502,7 @@ Template entities can be triggered using any automation trigger, including webho ```yaml template: - trigger: - - platform: webhook + - trigger: webhook webhook_id: my-super-secret-webhook-id sensor: - name: "Webhook Temperature" @@ -537,7 +537,7 @@ You can use a trigger-based template entity to convert any event or other automa ```yaml template: - trigger: - platform: event + trigger: event event_type: my_event binary_sensor: - name: Event recently fired @@ -554,7 +554,7 @@ This example shows how to store the last valid value of a temperature sensor. It ```yaml template: - trigger: - platform: state + trigger: state entity_id: sensor.outside_temperature condition: - condition: template @@ -753,9 +753,9 @@ The binary sensor turns on and sets the matching icon when the appropriate event ```yaml template: - trigger: - - platform: event + - trigger: event event_type: YOUR_EVENT - - platform: state + - trigger: state entity_id: binary_sensor.doorbell_rang to: "off" binary_sensor: @@ -820,7 +820,7 @@ and use the response in a template. ```yaml template: - trigger: - - platform: time_pattern + - trigger: time_pattern hours: /1 action: - action: weather.get_forecasts diff --git a/source/_integrations/tensorflow.markdown b/source/_integrations/tensorflow.markdown index 597e72e2821..53294479cd7 100644 --- a/source/_integrations/tensorflow.markdown +++ b/source/_integrations/tensorflow.markdown @@ -210,7 +210,7 @@ image_processing: # Example advanced automations.yaml entry - alias: "TensorFlow scanning" triggers: - - platform: state + - trigger: state entity_id: - binary_sensor.driveway actions: diff --git a/source/_integrations/thermoworks_smoke.markdown b/source/_integrations/thermoworks_smoke.markdown index e79c6d3c9d9..2cdb272f0e4 100644 --- a/source/_integrations/thermoworks_smoke.markdown +++ b/source/_integrations/thermoworks_smoke.markdown @@ -108,7 +108,7 @@ input_number: automation: - alias: "Alert when My Smoke Probe 1 is above threshold" triggers: - platform: template + trigger: template value_template: >- {% if (states("sensor.my_smoke_probe_1") | float) > (states("input_number.smoke_probe_1_threshold") | float) %} True diff --git a/source/_integrations/tibber.markdown b/source/_integrations/tibber.markdown index c133dfc9adb..d4d533bf733 100644 --- a/source/_integrations/tibber.markdown +++ b/source/_integrations/tibber.markdown @@ -144,7 +144,7 @@ The electricity price can be used to make automations. The sensor has a `max_pri ```yaml - alias: "Electricity price" triggers: - platform: time_pattern + trigger: time_pattern # Matches every hour at 1 minutes past whole minutes: 1 conditions: diff --git a/source/_integrations/timer.markdown b/source/_integrations/timer.markdown index 2791b39415d..44be36988f0 100644 --- a/source/_integrations/timer.markdown +++ b/source/_integrations/timer.markdown @@ -154,7 +154,7 @@ timer: id: "Timerstart" # Timer is started when the switch pumprun is set to on. triggers: - - platform: state + - trigger: state entity_id: switch.pumprun to: "on" actions: @@ -166,7 +166,7 @@ timer: - alias: "Timerstop" id: "Timerstop" triggers: - - platform: event + - trigger: event event_type: timer.finished event_data: entity_id: timer.test diff --git a/source/_integrations/totalconnect.markdown b/source/_integrations/totalconnect.markdown index d0270f64aa9..5e188a99d10 100644 --- a/source/_integrations/totalconnect.markdown +++ b/source/_integrations/totalconnect.markdown @@ -40,7 +40,7 @@ Give the user access to your Location, along with a user code, usually a 4 digit automation: - alias: "Alarm: Disarmed Daytime" triggers: - platform: state + trigger: state entity_id: alarm_control_panel.total_connect to: "disarmed" conditions: @@ -52,7 +52,7 @@ automation: entity_id: scene.OnDisarmedDaytime - alias: "Alarm: Armed Away" triggers: - platform: state + trigger: state entity_id: alarm_control_panel.total_connect to: "armed_away" actions: @@ -61,7 +61,7 @@ automation: entity_id: scene.OnArmedAway - alias: "Alarm: Arm Home Instant at Sunset" triggers: - platform: sun + trigger: sun event: sunset offset: '0' actions: diff --git a/source/_integrations/traccar_server.markdown b/source/_integrations/traccar_server.markdown index 17078b09b32..2303e8df266 100644 --- a/source/_integrations/traccar_server.markdown +++ b/source/_integrations/traccar_server.markdown @@ -267,7 +267,7 @@ The allows you to do something when the device "Millennium Falcon" enters the de ```yaml triggers: - - platform: state + - trigger: state entity_id: sensor.millennium_falcon_geofence to: 'Tatooine' actions: @@ -286,7 +286,7 @@ The allows you to do something when the device "Millennium Falcon" exceeds a def ```yaml triggers: - - platform: numeric_state + - trigger: numeric_state entity_id: sensor.millennium_falcon_speed above: 1337 actions: diff --git a/source/_integrations/transmission.markdown b/source/_integrations/transmission.markdown index eb9047ba11c..55b97be7c90 100644 --- a/source/_integrations/transmission.markdown +++ b/source/_integrations/transmission.markdown @@ -63,7 +63,7 @@ Example of an automation that notifies on successful download and removes the to ```yaml - alias: "Notify and remove completed torrent" triggers: - - platform: event + - trigger: event event_type: transmission_downloaded_torrent actions: - action: notify.telegram_notifier diff --git a/source/_integrations/twilio.markdown b/source/_integrations/twilio.markdown index 65fbd27f964..d57b3ea90b2 100644 --- a/source/_integrations/twilio.markdown +++ b/source/_integrations/twilio.markdown @@ -57,7 +57,7 @@ Here is an example: ```yaml automation: triggers: - platform: event + trigger: event event_type: twilio_data_received event_data: From: '+1XXXXXXXXXXX' @@ -78,7 +78,7 @@ An example of an SMS handler: ```yaml alias: Twilio incoming triggers: - - platform: event + - trigger: event event_type: twilio_data_received actions: - variables: diff --git a/source/_integrations/twilio_call.markdown b/source/_integrations/twilio_call.markdown index 445ee823fde..f5d0c6a0743 100644 --- a/source/_integrations/twilio_call.markdown +++ b/source/_integrations/twilio_call.markdown @@ -49,7 +49,7 @@ Twilio is a notification platform and thus can be controlled by calling the noti automation: - alias: "The sun has set" triggers: - platform: sun + trigger: sun event: sunset actions: action: notify.twilio_call diff --git a/source/_integrations/twilio_sms.markdown b/source/_integrations/twilio_sms.markdown index 7f6dcd02ebc..3bdd13b2ff3 100644 --- a/source/_integrations/twilio_sms.markdown +++ b/source/_integrations/twilio_sms.markdown @@ -52,7 +52,7 @@ Media can be included with messages by setting the optional `media_url` variable automation: - alias: "The sun has set" triggers: - platform: sun + trigger: sun event: sunset actions: action: notify.twilio_sms diff --git a/source/_integrations/universal.markdown b/source/_integrations/universal.markdown index 786a5b06436..4a0735dc028 100644 --- a/source/_integrations/universal.markdown +++ b/source/_integrations/universal.markdown @@ -259,7 +259,7 @@ media_player: automation: - alias: Turn on the TV when Kodi is activated triggers: - platform: state + trigger: state entity_id: media_player.kodi_tv from: "off" to: playing @@ -269,7 +269,7 @@ automation: entity_id: media_player.kodi_tv - alias: Turn off the TV when Kodi is in idle > 15 min triggers: - platform: state + trigger: state entity_id: media_player.kodi_tv to: idle for: diff --git a/source/_integrations/upb.markdown b/source/_integrations/upb.markdown index bca12af6b04..e5430e53241 100644 --- a/source/_integrations/upb.markdown +++ b/source/_integrations/upb.markdown @@ -179,7 +179,7 @@ Start a scene blinking. - alias: "'Specific scene activated'" description: "Trigger when scene 9 on network 42 is activated" triggers: - platform: event + trigger: event event_type: upb.scene_changed event_data: command: activated diff --git a/source/_integrations/update.markdown b/source/_integrations/update.markdown index 88829a7441d..b383b0db9f6 100644 --- a/source/_integrations/update.markdown +++ b/source/_integrations/update.markdown @@ -148,7 +148,7 @@ the update for a light bulb becomes available. automation: - alias: "Send notification when update available" triggers: - platform: state + trigger: state entity_id: update.my_light_bulb to: "on" actions: diff --git a/source/_integrations/utility_meter.markdown b/source/_integrations/utility_meter.markdown index b02d354e82e..bdab9600e16 100644 --- a/source/_integrations/utility_meter.markdown +++ b/source/_integrations/utility_meter.markdown @@ -213,11 +213,11 @@ a time based automation can be used: ```yaml automation: triggers: - - platform: time + - trigger: time at: "09:00:00" variables: tariff: "peak" - - platform: time + - trigger: time at: "21:00:00" variables: tariff: "offpeak" diff --git a/source/_integrations/vacuum.mqtt.markdown b/source/_integrations/vacuum.mqtt.markdown index 1d8ef5d236c..9ad9438ddd1 100644 --- a/source/_integrations/vacuum.mqtt.markdown +++ b/source/_integrations/vacuum.mqtt.markdown @@ -277,7 +277,7 @@ Action trigger example: ```yaml - alias: "Push command based on sensor" triggers: - - platform: state + - trigger: state entity_id: sensor.sensor actions: action: vacuum.send_command diff --git a/source/_integrations/valve.markdown b/source/_integrations/valve.markdown index 4eab65a5a2d..b5adc82ab29 100644 --- a/source/_integrations/valve.markdown +++ b/source/_integrations/valve.markdown @@ -58,7 +58,7 @@ Valves that allow setting a specific position may also be controlled with `valve ```yaml automation: triggers: - platform: time + trigger: time at: "07:15:00" actions: - action: valve.close @@ -80,7 +80,7 @@ Set the position of one or multiple valves if they support setting a specific po ```yaml automation: triggers: - platform: time + trigger: time at: "07:15:00" actions: - action: valve.set_position diff --git a/source/_integrations/velbus.markdown b/source/_integrations/velbus.markdown index e815f9826f0..172adcde8a9 100644 --- a/source/_integrations/velbus.markdown +++ b/source/_integrations/velbus.markdown @@ -126,7 +126,7 @@ The actual linking can be realized by two automation rules. One rule to control alias: "Control light living using Velbus push_button_10" triggers: - entity_id: binary_sensor.push_button_10 - platform: state + trigger: state to: "on" conditions: [] actions: @@ -138,10 +138,10 @@ The actual linking can be realized by two automation rules. One rule to control alias: "Update LED state of push_button_10" triggers: - entity_id: light.living - platform: state + trigger: state to: "on" - entity_id: light.living - platform: state + trigger: state to: "off" conditions: [] actions: diff --git a/source/_integrations/velux.markdown b/source/_integrations/velux.markdown index b39e1234bd2..cbb8141ec06 100644 --- a/source/_integrations/velux.markdown +++ b/source/_integrations/velux.markdown @@ -51,7 +51,7 @@ automation: alias: KLF reboot on hass stop event description: Reboots the KLF200 in order to avoid SSL Handshake issue triggers: - - platform: homeassistant + - trigger: homeassistant event: shutdown actions: - action: velux.reboot_gateway diff --git a/source/_integrations/verisure.markdown b/source/_integrations/verisure.markdown index 095e27a84a1..ee8ce9abe15 100644 --- a/source/_integrations/verisure.markdown +++ b/source/_integrations/verisure.markdown @@ -54,7 +54,7 @@ The `changed_by` attribute enables one to be able to take different actions depe automation: - alias: "Alarm status changed" triggers: - - platform: state + - trigger: state entity_id: alarm_control_panel.alarm_1 actions: - action: notify.notify diff --git a/source/_integrations/wake_on_lan.markdown b/source/_integrations/wake_on_lan.markdown index c32d6d4b1d2..697864cdc54 100644 --- a/source/_integrations/wake_on_lan.markdown +++ b/source/_integrations/wake_on_lan.markdown @@ -173,7 +173,7 @@ A switch defined with the `wake_on_lan` platform will render in the UI with both - Continuing your example, the trigger YAML will look like this: ```yaml - platform: state + trigger: state entity_id: - input_button.wake_pc ``` diff --git a/source/_integrations/water_heater.markdown b/source/_integrations/water_heater.markdown index b499b1a2823..3cda23ce497 100644 --- a/source/_integrations/water_heater.markdown +++ b/source/_integrations/water_heater.markdown @@ -59,7 +59,7 @@ Sets target temperature of water heater device. ```yaml automation: triggers: - platform: time + trigger: time at: "07:15:00" actions: - action: water_heater.set_temperature @@ -84,7 +84,7 @@ Set operation mode for water heater device ```yaml automation: triggers: - platform: time + trigger: time at: "07:15:00" actions: - action: water_heater.set_operation_mode @@ -108,7 +108,7 @@ Turn away mode on or off for water heater device ```yaml automation: triggers: - platform: time + trigger: time at: "07:15:00" actions: - action: water_heater.set_away_mode diff --git a/source/_integrations/weather.markdown b/source/_integrations/weather.markdown index 6b7810e539b..6d138a86913 100644 --- a/source/_integrations/weather.markdown +++ b/source/_integrations/weather.markdown @@ -122,7 +122,7 @@ Example template sensor that contains the hourly forecast ```yaml template: - trigger: - - platform: time_pattern + - trigger: time_pattern hours: /1 action: - action: weather.get_forecasts diff --git a/source/_integrations/webostv.markdown b/source/_integrations/webostv.markdown index ccc5edc280a..c1651c6a401 100644 --- a/source/_integrations/webostv.markdown +++ b/source/_integrations/webostv.markdown @@ -52,7 +52,7 @@ wake_on_lan: # enables `wake_on_lan` integration automation: - alias: "Turn On Living Room TV with WakeOnLan" triggers: - - platform: webostv.turn_on + - trigger: webostv.turn_on entity_id: media_player.lg_webos_smart_tv actions: - action: wake_on_lan.send_magic_packet @@ -163,7 +163,7 @@ The icon can be overridden for individual notifications by providing a path to a automation: - alias: "Front door motion" triggers: - platform: state + trigger: state entity_id: binary_sensor.front_door_motion to: "on" actions: diff --git a/source/_integrations/wemo.markdown b/source/_integrations/wemo.markdown index 28f0905674b..8700f9f8a15 100644 --- a/source/_integrations/wemo.markdown +++ b/source/_integrations/wemo.markdown @@ -148,7 +148,7 @@ The following is an example implementation of an automation: - id: long_press_living_room alias: "Toggle amplifier power" triggers: - - platform: event + - trigger: event event_type: wemo_subscription_event event_data: type: LongPress diff --git a/source/_integrations/wled.markdown b/source/_integrations/wled.markdown index ea1e4714958..6026c089fd3 100644 --- a/source/_integrations/wled.markdown +++ b/source/_integrations/wled.markdown @@ -203,7 +203,7 @@ 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" triggers: - - platform: state + - trigger: state entity_id: sensor.weather_condition to: "rainy" actions: diff --git a/source/_integrations/workday.markdown b/source/_integrations/workday.markdown index d66aa6b5215..527a83e78aa 100644 --- a/source/_integrations/workday.markdown +++ b/source/_integrations/workday.markdown @@ -84,7 +84,7 @@ Example usage for automation: automation: alias: "Turn on heater on workdays" triggers: - platform: time + trigger: time at: "08:00:00" conditions: condition: state diff --git a/source/_integrations/xiaomi_aqara.markdown b/source/_integrations/xiaomi_aqara.markdown index cd04863bde0..00f86e0e63d 100644 --- a/source/_integrations/xiaomi_aqara.markdown +++ b/source/_integrations/xiaomi_aqara.markdown @@ -164,7 +164,7 @@ 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" triggers: - platform: event + trigger: event event_type: xiaomi_aqara.click event_data: entity_id: binary_sensor.switch_158d000xxxxxc2 @@ -178,7 +178,7 @@ This example plays the sound of a dog barking when the button is held down and s - alias: "Stop barking immediately on single click" triggers: - platform: event + trigger: event event_type: xiaomi_aqara.click event_data: entity_id: binary_sensor.switch_158d000xxxxxc2 @@ -196,7 +196,7 @@ This example toggles the living room lamp on a double click of the button. ```yaml - alias: "Double Click to toggle living room lamp" triggers: - platform: event + trigger: event event_type: xiaomi_aqara.click event_data: entity_id: binary_sensor.switch_158d000xxxxxc2 diff --git a/source/_integrations/xiaomi_miio.markdown b/source/_integrations/xiaomi_miio.markdown index bfbb02eca22..55df3d0f315 100644 --- a/source/_integrations/xiaomi_miio.markdown +++ b/source/_integrations/xiaomi_miio.markdown @@ -1501,7 +1501,7 @@ automation: - alias: "Test vacuum zone3" triggers: - event: start - platform: homeassistant + trigger: homeassistant conditions: [] actions: - action: xiaomi_miio.vacuum_clean_zone @@ -1522,7 +1522,7 @@ automation: - alias: "Test vacuum zone3" triggers: - event: start - platform: homeassistant + trigger: homeassistant conditions: [] actions: - action: xiaomi_miio.vacuum_clean_zone @@ -1544,7 +1544,7 @@ automation: - alias: "Test vacuum zone3" triggers: - event: start - platform: homeassistant + trigger: homeassistant conditions: [] actions: - action: xiaomi_miio.vacuum_clean_zone @@ -1581,7 +1581,7 @@ automation: - alias: "Vacuum kitchen and living room" triggers: - event: start - platform: homeassistant + trigger: homeassistant conditions: [] actions: - action: xiaomi_miio.vacuum_clean_segment @@ -1598,7 +1598,7 @@ automation: - alias: "Vacuum kitchen" triggers: - event: start - platform: homeassistant + trigger: homeassistant conditions: [] actions: - action: xiaomi_miio.vacuum_clean_segment @@ -1615,7 +1615,7 @@ automation: - alias: "Vacuum kitchen" triggers: - event: start - platform: homeassistant + trigger: homeassistant actions: - action: xiaomi_miio.vacuum_clean_segment target: diff --git a/source/_integrations/yale.markdown b/source/_integrations/yale.markdown index edc378c4eeb..e05e11eabfb 100644 --- a/source/_integrations/yale.markdown +++ b/source/_integrations/yale.markdown @@ -142,7 +142,7 @@ Using the lock operation sensors, you can detect when a user operates a lock and description: John Doe locks or unlocks the Front Door triggers: - entity_id: sensor.front_door_operator - platform: state + trigger: state to: John Doe conditions: - condition: template diff --git a/source/_integrations/zwave_js.markdown b/source/_integrations/zwave_js.markdown index 8dabe83c992..f07493e2e0c 100644 --- a/source/_integrations/zwave_js.markdown +++ b/source/_integrations/zwave_js.markdown @@ -501,7 +501,7 @@ Notification event data can be used to trigger automations, both in the automati ```yaml # Fires whenever the lock is unlocked by the keypad. triggers: - - platform: event + - trigger: event event_type: zwave_js_notification event_data: node_id: 14 @@ -647,7 +647,7 @@ This event can be used to trigger a refresh of values when the new state needs t ```yaml triggers: - - platform: event + - trigger: event event_type: zwave_js_value_updated event_data: entity_id: switch.in_wall_dual_relay_switch @@ -672,7 +672,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). triggers: - platform: zwave_js.value_updated + trigger: zwave_js.value_updated # At least one `device_id` or `entity_id` must be provided device_id: 45d7d3230dbb7441473ec883dab294d4 # Garage Door Lock device ID entity_id: @@ -722,7 +722,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). triggers: - platform: zwave_js.event + trigger: 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 entity_id: