mirror of
https://github.com/home-assistant/home-assistant.io.git
synced 2025-07-23 17:27:19 +00:00
Change trigger platform key to trigger (#34901)
* Change trigger platform key to trigger * Error sneaked in
This commit is contained in:
parent
be8908fa14
commit
b825527486
@ -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:
|
||||
|
@ -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 }}"
|
||||
|
@ -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:
|
||||
|
@ -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
|
||||
```
|
||||
|
@ -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
|
||||
|
@ -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"
|
||||
|
@ -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
|
||||
```
|
||||
|
@ -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:
|
||||
|
@ -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:
|
||||
|
@ -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"
|
||||
|
@ -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
|
||||
|
@ -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
|
||||
|
@ -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"
|
||||
|
@ -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"
|
||||
|
@ -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
|
||||
|
@ -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
|
||||
|
@ -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"
|
||||
|
@ -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
|
||||
|
@ -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
|
||||
|
@ -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
|
||||
|
@ -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:
|
||||
|
@ -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
|
||||
|
@ -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
|
||||
|
@ -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
|
||||
|
@ -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:
|
||||
|
@ -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
|
||||
|
@ -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
|
||||
|
@ -292,7 +292,7 @@ script:
|
||||
automation:
|
||||
- alias: "Close covers at night"
|
||||
triggers:
|
||||
- platform: sun
|
||||
- trigger: sun
|
||||
event: sunset
|
||||
offset: "+00:30:00"
|
||||
actions:
|
||||
|
@ -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:
|
||||
|
@ -23,7 +23,7 @@ Example:
|
||||
- id: "123456789"
|
||||
alias: "Light turns off"
|
||||
triggers:
|
||||
- platform: device
|
||||
- trigger: device
|
||||
device_id: 7a92d5ee74014a0b86903fc669b0bcd6
|
||||
domain: light
|
||||
type: turn_off
|
||||
|
@ -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"
|
||||
|
@ -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:
|
||||
|
@ -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
|
||||
|
@ -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
|
||||
|
@ -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
|
||||
|
@ -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
|
||||
|
@ -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:
|
||||
|
@ -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
|
||||
|
@ -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
|
||||
|
@ -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]
|
||||
|
@ -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"
|
||||
|
@ -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
|
||||
|
@ -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
|
||||
|
@ -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"
|
||||
|
@ -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
|
||||
|
@ -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
|
||||
|
@ -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
|
||||
|
@ -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
|
||||
|
@ -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
|
||||
|
@ -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:
|
||||
|
@ -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
|
||||
|
@ -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"
|
||||
|
@ -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
|
||||
|
@ -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
|
||||
|
@ -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
|
||||
|
@ -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"
|
||||
|
@ -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
|
||||
|
@ -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
|
||||
|
@ -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
|
||||
|
@ -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
|
||||
|
@ -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
|
||||
|
@ -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
|
||||
|
@ -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
|
||||
```
|
||||
|
||||
|
@ -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
|
||||
|
@ -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
|
||||
|
@ -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"
|
||||
|
@ -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
|
||||
|
@ -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
|
||||
|
@ -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:
|
||||
|
@ -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:
|
||||
|
@ -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:
|
||||
|
@ -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:
|
||||
|
@ -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
|
||||
|
@ -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
|
||||
|
@ -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:
|
||||
|
@ -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
|
||||
|
@ -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
|
||||
|
@ -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
|
||||
|
@ -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
|
||||
|
@ -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:
|
||||
|
@ -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"
|
||||
|
@ -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:
|
||||
|
@ -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
|
||||
|
@ -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
|
||||
|
@ -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"
|
||||
|
@ -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
|
||||
|
@ -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
|
||||
|
@ -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
|
||||
|
@ -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:
|
||||
|
@ -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
|
||||
|
@ -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
|
||||
|
@ -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
|
||||
|
@ -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:
|
||||
|
@ -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
|
||||
|
@ -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
|
||||
|
@ -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:
|
||||
|
@ -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: []
|
||||
|
@ -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:
|
||||
|
@ -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
|
||||
|
@ -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
|
||||
|
Some files were not shown because too many files have changed in this diff Show More
Loading…
x
Reference in New Issue
Block a user