mirror of
https://github.com/home-assistant/home-assistant.io.git
synced 2025-07-12 03:46:49 +00:00
Update some service calls to use target (#16575)
This commit is contained in:
parent
cabcd91686
commit
a1d0b36e81
@ -33,6 +33,7 @@ automation:
|
||||
devname: living_room_switch
|
||||
action:
|
||||
service: light.turn_on
|
||||
target:
|
||||
entity_id: light.hue_color_lamp_3
|
||||
|
||||
- alias: "Turn off living room light"
|
||||
@ -44,5 +45,6 @@ automation:
|
||||
devname: living_room_switch
|
||||
action:
|
||||
service: light.turn_off
|
||||
target:
|
||||
entity_id: light.hue_color_lamp_3
|
||||
```
|
||||
|
@ -29,6 +29,7 @@ automation:
|
||||
at: "05:00:00"
|
||||
action:
|
||||
service: homeassistant.turn_on
|
||||
target:
|
||||
entity_id: input_boolean.trigger_first_morning
|
||||
|
||||
# turns it off an hour after sunrise
|
||||
@ -39,6 +40,7 @@ automation:
|
||||
offset: "01:00:00"
|
||||
action:
|
||||
service: homeassistant.turn_off
|
||||
target:
|
||||
entity_id: input_boolean.trigger_first_morning
|
||||
|
||||
|
||||
@ -60,6 +62,7 @@ automation:
|
||||
# turn off the "waiting" boolean regardless of whether lights will turn on
|
||||
# so that this happens only once
|
||||
- service: homeassistant.turn_off
|
||||
target:
|
||||
entity_id: input_boolean.trigger_first_morning
|
||||
|
||||
# But only turn on lights if the living room and kitchen lights are off or dimmed
|
||||
@ -84,6 +87,7 @@ automation:
|
||||
# Trigger a scene
|
||||
# You could add as many services or scenes as you'd like
|
||||
- service: scene.turn_on
|
||||
target:
|
||||
entity_id: scene.morning_first_motion
|
||||
```
|
||||
|
||||
|
@ -29,6 +29,7 @@ automation:
|
||||
# start alarm on movement if alarm activated
|
||||
# and the alarm is not triggered
|
||||
service: script.turn_on
|
||||
target:
|
||||
entity_id: script.alarm_room1
|
||||
|
||||
- alias: "flash_room1_start"
|
||||
@ -38,6 +39,7 @@ automation:
|
||||
to: "on"
|
||||
action:
|
||||
service: script.turn_on
|
||||
target:
|
||||
entity_id: script.flash_room1
|
||||
|
||||
- alias: "flash_room1_stop"
|
||||
@ -51,6 +53,7 @@ automation:
|
||||
state: "off"
|
||||
action:
|
||||
service: script.turn_off
|
||||
target:
|
||||
entity_id: script.flash_room1
|
||||
|
||||
script:
|
||||
|
@ -24,6 +24,7 @@ automation:
|
||||
before: "23:00"
|
||||
action:
|
||||
service: light.turn_on
|
||||
target:
|
||||
entity_id: light.couch_lamp
|
||||
```
|
||||
|
||||
@ -41,6 +42,7 @@ And then of course turn off the lamp when it stops raining but only if it's with
|
||||
after_offset: "-01:00:00"
|
||||
action:
|
||||
service: light.turn_off
|
||||
target:
|
||||
entity_id: light.couch_lamp
|
||||
```
|
||||
|
||||
|
@ -18,6 +18,7 @@ automation:
|
||||
state: home
|
||||
action:
|
||||
service: light.turn_on
|
||||
target:
|
||||
entity_id: group.living_room_lights
|
||||
```
|
||||
|
||||
@ -32,6 +33,7 @@ automation:
|
||||
at: "07:15:00"
|
||||
action:
|
||||
service: light.turn_on
|
||||
target:
|
||||
entity_id: light.bedroom
|
||||
data:
|
||||
# 900 seconds = 15 minutes
|
||||
@ -79,6 +81,7 @@ Solar elevation automations can cope with offsets from sunset / sunrise as the s
|
||||
below: 3.5
|
||||
action:
|
||||
service: scene.turn_on
|
||||
target:
|
||||
entity_id: scene.background_lights
|
||||
|
||||
- alias: "Turn more lights on as the sun gets dimmer"
|
||||
@ -89,6 +92,7 @@ Solar elevation automations can cope with offsets from sunset / sunrise as the s
|
||||
below: 1.5
|
||||
action:
|
||||
service: scene.turn_on
|
||||
target:
|
||||
entity_id: scene.more_lights
|
||||
|
||||
- alias: "Close blind at dusk"
|
||||
@ -99,6 +103,7 @@ Solar elevation automations can cope with offsets from sunset / sunrise as the s
|
||||
below: -2.5
|
||||
action:
|
||||
service: switch.turn_off
|
||||
target:
|
||||
entity_id: switch.blind
|
||||
```
|
||||
|
||||
|
@ -27,6 +27,7 @@ automation:
|
||||
state: "on"
|
||||
action:
|
||||
service: light.turn_on
|
||||
target:
|
||||
entity_id: light.woonkamer_livingcolors
|
||||
data:
|
||||
effect: random
|
||||
|
@ -23,6 +23,7 @@ automation:
|
||||
entity_id: zwave.YOUR_REMOTE
|
||||
action:
|
||||
- service: script.turn_on
|
||||
target:
|
||||
entity_id: script.ramp_light
|
||||
data:
|
||||
variables:
|
||||
@ -39,6 +40,7 @@ automation:
|
||||
entity_id: zwave.YOUR_REMOTE
|
||||
action:
|
||||
- service: script.turn_on
|
||||
target:
|
||||
entity_id: script.ramp_light
|
||||
data:
|
||||
variables:
|
||||
@ -60,6 +62,7 @@ automation:
|
||||
entity_id: zwave.YOUR_REMOTE
|
||||
action:
|
||||
- service: script.turn_off
|
||||
target:
|
||||
entity_id: script.ramp_light
|
||||
```
|
||||
|
||||
|
@ -53,6 +53,7 @@ automation:
|
||||
state: "below_horizon"
|
||||
action:
|
||||
service: scene.turn_on
|
||||
target:
|
||||
entity_id: scene.livingroom_normal
|
||||
|
||||
- alias: "Media player playing"
|
||||
@ -67,6 +68,7 @@ automation:
|
||||
state: "below_horizon"
|
||||
action:
|
||||
service: scene.turn_on
|
||||
target:
|
||||
entity_id: scene.livingroom_dim
|
||||
```
|
||||
|
||||
|
@ -73,6 +73,7 @@ automation:
|
||||
state: "off"
|
||||
action:
|
||||
service: homeassistant.turn_on
|
||||
target:
|
||||
entity_id: script.restarthawemo
|
||||
- alias: "Stop HA"
|
||||
trigger:
|
||||
@ -91,6 +92,7 @@ automation:
|
||||
state: "on"
|
||||
action:
|
||||
service: homeassistant.turn_off
|
||||
target:
|
||||
entity_id: script.restarthawemo
|
||||
```
|
||||
|
||||
|
@ -17,6 +17,7 @@ automation:
|
||||
to: "on"
|
||||
action:
|
||||
service: light.turn_on
|
||||
target:
|
||||
entity_id: light.kitchen_light
|
||||
|
||||
- alias: "Turn off kitchen light 10 minutes after last movement"
|
||||
@ -28,6 +29,7 @@ automation:
|
||||
minutes: 10
|
||||
action:
|
||||
service: light.turn_off
|
||||
target:
|
||||
entity_id: light.kitchen_light
|
||||
```
|
||||
|
||||
@ -82,6 +84,7 @@ You can also restrict lights from turning on based on time of day and implement
|
||||
before: "23:30"
|
||||
action:
|
||||
service: homeassistant.turn_on
|
||||
target:
|
||||
entity_id: group.office_lights
|
||||
data:
|
||||
transition: 15
|
||||
@ -96,6 +99,7 @@ You can also restrict lights from turning on based on time of day and implement
|
||||
minutes: 15
|
||||
action:
|
||||
- service: homeassistant.turn_off
|
||||
target:
|
||||
entity_id: group.office_lights
|
||||
data:
|
||||
transition: 160
|
||||
|
@ -281,6 +281,7 @@ automation:
|
||||
seconds: "{{ states('input_number.lock_sec')|int }}"
|
||||
action:
|
||||
service: lock.lock
|
||||
target:
|
||||
entity_id: lock.my_place
|
||||
```
|
||||
|
||||
@ -337,6 +338,7 @@ automation:
|
||||
below: -4.0
|
||||
action:
|
||||
service: switch.turn_on
|
||||
target:
|
||||
entity_id: switch.exterior_lighting
|
||||
```
|
||||
|
||||
@ -466,8 +468,10 @@ automation:
|
||||
to: "on"
|
||||
action:
|
||||
- service: climate.turn_on
|
||||
target:
|
||||
entity_id: climate.office
|
||||
- service: input_datetime.set_datetime
|
||||
target:
|
||||
entity_id: input_datetime.turn_off_ac
|
||||
data:
|
||||
datetime: >
|
||||
@ -479,6 +483,7 @@ automation:
|
||||
at: input_datetime.turn_off_ac
|
||||
action:
|
||||
service: climate.turn_off
|
||||
target:
|
||||
entity_id: climate.office
|
||||
```
|
||||
|
||||
@ -495,6 +500,7 @@ automation:
|
||||
at: sensor.phone_next_alarm
|
||||
action:
|
||||
service: light.turn_on
|
||||
target:
|
||||
entity_id: light.bedroom
|
||||
```
|
||||
|
||||
|
@ -238,6 +238,7 @@ automation:
|
||||
to: "home"
|
||||
action:
|
||||
service: light.turn_on
|
||||
target:
|
||||
entity_id: light.entryway
|
||||
- alias: "Automation 2"
|
||||
trigger:
|
||||
@ -246,6 +247,7 @@ automation:
|
||||
from: "home"
|
||||
action:
|
||||
service: light.turn_off
|
||||
target:
|
||||
entity_id: light.entryway
|
||||
```
|
||||
|
||||
@ -267,6 +269,7 @@ trigger:
|
||||
to: "home"
|
||||
action:
|
||||
service: light.turn_on
|
||||
target:
|
||||
entity_id: light.entryway
|
||||
```
|
||||
|
||||
@ -280,6 +283,7 @@ trigger:
|
||||
from: "home"
|
||||
action:
|
||||
service: light.turn_off
|
||||
target:
|
||||
entity_id: light.entryway
|
||||
```
|
||||
|
||||
@ -377,6 +381,7 @@ automation:
|
||||
to: "home"
|
||||
action:
|
||||
service: light.turn_on
|
||||
target:
|
||||
entity_id: light.entryway
|
||||
- alias: "Automation 2"
|
||||
trigger:
|
||||
@ -385,6 +390,7 @@ automation:
|
||||
from: "home"
|
||||
action:
|
||||
service: light.turn_off
|
||||
target:
|
||||
entity_id: light.entryway
|
||||
```
|
||||
|
||||
@ -406,6 +412,7 @@ automation: !include_dir_merge_list automation/
|
||||
to: "home"
|
||||
action:
|
||||
service: light.turn_on
|
||||
target:
|
||||
entity_id: light.entryway
|
||||
- alias: "Automation 2"
|
||||
trigger:
|
||||
@ -414,6 +421,7 @@ automation: !include_dir_merge_list automation/
|
||||
from: "home"
|
||||
action:
|
||||
service: light.turn_off
|
||||
target:
|
||||
entity_id: light.entryway
|
||||
```
|
||||
|
||||
|
@ -55,6 +55,7 @@ automation:
|
||||
to: "home"
|
||||
action:
|
||||
service: scene.turn_on
|
||||
target:
|
||||
entity_id: scene.romantic
|
||||
```
|
||||
|
||||
|
@ -234,6 +234,7 @@ This can be used to take different actions based on whether or not the condition
|
||||
- service: script.door_did_not_open
|
||||
default:
|
||||
- service: script.turn_on
|
||||
target:
|
||||
entity_id:
|
||||
- script.door_did_open
|
||||
- script.play_fanfare
|
||||
@ -243,6 +244,7 @@ This can be used to take different actions based on whether or not the condition
|
||||
timeout: 10
|
||||
continue_on_timeout: false
|
||||
- service: switch.turn_on
|
||||
target:
|
||||
entity_id: switch.some_light
|
||||
- wait_for_trigger:
|
||||
- platform: state
|
||||
@ -252,6 +254,7 @@ This can be used to take different actions based on whether or not the condition
|
||||
timeout: "{{ wait.remaining }}"
|
||||
continue_on_timeout: false
|
||||
- service: switch.turn_off
|
||||
target:
|
||||
entity_id: switch.some_light
|
||||
```
|
||||
{% endraw %}
|
||||
@ -486,6 +489,7 @@ automation:
|
||||
data:
|
||||
duration: 60
|
||||
- service: light.turn_on
|
||||
target:
|
||||
entity_id: all
|
||||
```
|
||||
|
||||
@ -504,12 +508,14 @@ automation:
|
||||
value_template: "{{ trigger.to_state.state == 'on' }}"
|
||||
sequence:
|
||||
- service: script.turn_on
|
||||
target:
|
||||
entity_id:
|
||||
- script.slowly_turn_on_front_lights
|
||||
- script.announce_someone_at_door
|
||||
# ELSE (i.e., motion stopped)
|
||||
default:
|
||||
- service: light.turn_off
|
||||
target:
|
||||
entity_id: light.front_lights
|
||||
```
|
||||
|
||||
@ -535,15 +541,18 @@ automation:
|
||||
value_template: "{{ now().hour < 18 }}"
|
||||
sequence:
|
||||
- service: light.turn_off
|
||||
target:
|
||||
entity_id: light.living_room
|
||||
- service: script.sim_day
|
||||
# ELSE night
|
||||
default:
|
||||
- service: light.turn_off
|
||||
target:
|
||||
entity_id: light.kitchen
|
||||
- delay:
|
||||
minutes: "{{ range(1, 11)|random }}"
|
||||
- service: light.turn_off
|
||||
target:
|
||||
entity_id: all
|
||||
```
|
||||
|
||||
@ -573,6 +582,7 @@ automation:
|
||||
is_state('binary_sensor.all_clear', 'off') }}
|
||||
sequence:
|
||||
- service: script.turn_on
|
||||
target:
|
||||
entity_id: script.flash_lights
|
||||
- service: script.arrive_home
|
||||
data:
|
||||
|
@ -1165,6 +1165,7 @@ Let's see how this works in an automation for a Scene Master that's assigned as
|
||||
action:
|
||||
- data:
|
||||
service: light.toggle
|
||||
target:
|
||||
entity_id: group.all_lights
|
||||
```
|
||||
|
||||
@ -1402,6 +1403,7 @@ Example Event:
|
||||
scene_data: 7680
|
||||
action:
|
||||
- service: switch.toggle
|
||||
target:
|
||||
entity_id: switch.office_fan
|
||||
```
|
||||
|
||||
@ -1604,6 +1606,7 @@ Example Event:
|
||||
scene_data: 0
|
||||
action:
|
||||
- service: switch.toggle
|
||||
target:
|
||||
entity_id: switch.office_fan
|
||||
```
|
||||
|
||||
|
@ -299,6 +299,7 @@ intent_script:
|
||||
amzn1.ask.skill.08888888-7777-6666-5555-444444444444:
|
||||
action:
|
||||
service: script.turn_on
|
||||
target:
|
||||
entity_id: script.red_alert
|
||||
speech:
|
||||
type: plain
|
||||
|
@ -64,6 +64,7 @@ The Arlo integration also provides a camera service to enable/disable the motion
|
||||
event: start
|
||||
action:
|
||||
service: camera.enable_motion_detection
|
||||
target:
|
||||
entity_id: camera.arlo_frontdoor
|
||||
```
|
||||
|
||||
@ -112,6 +113,7 @@ Arming the Arlo Base Station when leaving.
|
||||
to: not_home
|
||||
action:
|
||||
service: alarm_control_panel.alarm_arm_away
|
||||
target:
|
||||
entity_id: alarm_control_panel.my_arlo_base_station
|
||||
```
|
||||
|
||||
@ -127,6 +129,7 @@ Setting Arlo to a custom mode (mapped to `home_mode_name` in `configuration.yaml
|
||||
to: home
|
||||
action:
|
||||
service: alarm_control_panel.alarm_arm_home
|
||||
target:
|
||||
entity_id: alarm_control_panel.my_arlo_base_station
|
||||
```
|
||||
|
||||
|
@ -50,6 +50,7 @@ The requirement is that you have setup the [`xiaomi aqara` integration](/integra
|
||||
below: 300
|
||||
action:
|
||||
- service: light.turn_on
|
||||
target:
|
||||
entity_id: light.gateway_light_34ce00xxxx11
|
||||
data:
|
||||
brightness: 5
|
||||
@ -66,6 +67,7 @@ The requirement is that you have setup the [`xiaomi aqara` integration](/integra
|
||||
minutes: 5
|
||||
action:
|
||||
- service: light.turn_off
|
||||
target:
|
||||
entity_id: light.gateway_light_34ce00xxxx11
|
||||
- service: automation.turn_off
|
||||
data:
|
||||
@ -83,6 +85,7 @@ The requirement is that you have setup the [`xiaomi aqara` integration](/integra
|
||||
to: "on"
|
||||
action:
|
||||
service: climate.set_operation_mode
|
||||
target:
|
||||
entity_id: climate.livingroom
|
||||
data:
|
||||
operation_mode: "Off"
|
||||
@ -96,6 +99,7 @@ The requirement is that you have setup the [`xiaomi aqara` integration](/integra
|
||||
minutes: 5
|
||||
action:
|
||||
service: climate.set_operation_mode
|
||||
target:
|
||||
entity_id: climate.livingroom
|
||||
data:
|
||||
operation_mode: "Smart schedule"
|
||||
@ -170,6 +174,7 @@ As indicated in the table on top of this page there are 3 versions of the button
|
||||
click_type: single
|
||||
action:
|
||||
service: switch.toggle
|
||||
target:
|
||||
entity_id: switch.wall_switch_left_158d000xxxxx01
|
||||
- alias: "Toggle couch light on double click"
|
||||
trigger:
|
||||
@ -180,6 +185,7 @@ As indicated in the table on top of this page there are 3 versions of the button
|
||||
click_type: double
|
||||
action:
|
||||
service: switch.toggle
|
||||
target:
|
||||
entity_id: switch.wall_switch_right_158d000xxxxx01
|
||||
- alias: "Let a dog bark on long press"
|
||||
trigger:
|
||||
@ -210,6 +216,7 @@ Available events are `flip90`, `flip180`, `move`, `tap_twice`, `shake_air`, `swi
|
||||
action_type: flip90
|
||||
action:
|
||||
- service: light.turn_on
|
||||
target:
|
||||
entity_id: light.gateway_light_28xxxxxxxxxx
|
||||
data:
|
||||
color_name: "springgreen"
|
||||
@ -222,6 +229,7 @@ Available events are `flip90`, `flip180`, `move`, `tap_twice`, `shake_air`, `swi
|
||||
action_type: flip180
|
||||
action:
|
||||
- service: light.turn_on
|
||||
target:
|
||||
entity_id: light.gateway_light_28xxxxxxxxxx
|
||||
data:
|
||||
color_name: "darkviolet"
|
||||
@ -234,6 +242,7 @@ Available events are `flip90`, `flip180`, `move`, `tap_twice`, `shake_air`, `swi
|
||||
action_type: move
|
||||
action:
|
||||
- service: light.turn_on
|
||||
target:
|
||||
entity_id: light.gateway_light_28xxxxxxxxxx
|
||||
data:
|
||||
color_name: "gold"
|
||||
@ -246,6 +255,7 @@ Available events are `flip90`, `flip180`, `move`, `tap_twice`, `shake_air`, `swi
|
||||
action_type: tap_twice
|
||||
action:
|
||||
- service: light.turn_on
|
||||
target:
|
||||
entity_id: light.gateway_light_28xxxxxxxxxx
|
||||
data:
|
||||
color_name: "deepskyblue"
|
||||
@ -258,6 +268,7 @@ Available events are `flip90`, `flip180`, `move`, `tap_twice`, `shake_air`, `swi
|
||||
action_type: shake_air
|
||||
action:
|
||||
- service: light.turn_on
|
||||
target:
|
||||
entity_id: light.gateway_light_28xxxxxxxxxx
|
||||
data:
|
||||
color_name: "blue"
|
||||
@ -279,6 +290,7 @@ The Aqara Wireless Switch is available as single-key and double-key version. Eac
|
||||
click_type: single
|
||||
action:
|
||||
service: light.turn_on
|
||||
target:
|
||||
entity_id: light.gateway_light_34xxxxxxxx13
|
||||
data:
|
||||
brightness: >-
|
||||
@ -301,6 +313,7 @@ The Aqara Wireless Switch is available as single-key and double-key version. Eac
|
||||
click_type: single
|
||||
action:
|
||||
service: light.turn_on
|
||||
target:
|
||||
entity_id: light.gateway_light_34xxxxxxxx13
|
||||
data:
|
||||
brightness: >-
|
||||
@ -323,6 +336,7 @@ The Aqara Wireless Switch is available as single-key and double-key version. Eac
|
||||
click_type: both
|
||||
action:
|
||||
service: light.turn_off
|
||||
target:
|
||||
entity_id: light.gateway_light_34xxxxxxxx13
|
||||
```
|
||||
|
||||
|
@ -129,6 +129,7 @@ Here, this example assumes your blink module is named `My Sync Module` and that
|
||||
to: "not_home"
|
||||
action:
|
||||
service: alarm_control_panel.alarm_arm_away
|
||||
target:
|
||||
entity_id: alarm_control_panel.blink_my_sync_module
|
||||
```
|
||||
|
||||
@ -145,6 +146,7 @@ Similar to the previous example, this automation will disarm blink when arriving
|
||||
to: "home"
|
||||
action:
|
||||
service: alarm_control_panel.alarm_disarm
|
||||
target:
|
||||
entity_id: alarm_control_panel.blink_my_sync_module
|
||||
```
|
||||
|
||||
|
@ -169,6 +169,7 @@ calendar:
|
||||
at: "06:40:00"
|
||||
action:
|
||||
- service: media_player.media_play
|
||||
target:
|
||||
entity_id: media_player.bedroom
|
||||
condition:
|
||||
- condition: state
|
||||
|
@ -205,6 +205,7 @@ automation:
|
||||
event: 1002
|
||||
action:
|
||||
service: light.toggle
|
||||
target:
|
||||
entity_id: light.lamp
|
||||
|
||||
- alias: "Increase brightness of lamp from dimmer"
|
||||
@ -249,6 +250,7 @@ automation:
|
||||
gesture: 7
|
||||
action:
|
||||
service: light.turn_on
|
||||
target:
|
||||
entity_id: light.lamp
|
||||
```
|
||||
|
||||
|
@ -216,5 +216,6 @@ image_processing:
|
||||
- binary_sensor.driveway
|
||||
action:
|
||||
- service: image_processing.scan
|
||||
target:
|
||||
entity_id: image_processing.doods_camera_driveway
|
||||
```
|
||||
|
@ -179,6 +179,7 @@ Note: Remember to complete the schedule assignment steps above for each event ty
|
||||
event_type: doorbird_driveway_gate_somebody_pressed_the_button
|
||||
action:
|
||||
service: light.turn_on
|
||||
target:
|
||||
entity_id: light.side_entry_porch
|
||||
```
|
||||
|
||||
|
@ -119,6 +119,7 @@ The following is an example implementation of an automation:
|
||||
key: Fwd
|
||||
action:
|
||||
- service: media_player.volume_up
|
||||
target:
|
||||
entity_id: media_player.amplifier
|
||||
```
|
||||
|
||||
|
@ -62,6 +62,7 @@ automation:
|
||||
event_type: feedreader
|
||||
action:
|
||||
service: script.turn_on
|
||||
target:
|
||||
entity_id: script.my_action
|
||||
```
|
||||
|
||||
|
@ -126,6 +126,7 @@ automation:
|
||||
entity_id: sensor.incidents
|
||||
action:
|
||||
service: light.turn_on
|
||||
target:
|
||||
entity_id: light.bedroom
|
||||
|
||||
- alias: "Play TTS incident details when incident is received"
|
||||
@ -154,6 +155,7 @@ automation:
|
||||
entity_id: switch.response_button
|
||||
action:
|
||||
service: homeassistant.turn_on
|
||||
target:
|
||||
entity_id: switch.incident_response
|
||||
|
||||
- alias: "Cast FireServiceRota dashboard to Nest Hub"
|
||||
|
@ -81,6 +81,7 @@ automation:
|
||||
click_type: single
|
||||
action:
|
||||
service: homeassistant.turn_on
|
||||
target:
|
||||
entity_id: group.lights_livingroom
|
||||
```
|
||||
|
||||
|
@ -56,6 +56,7 @@ automation:
|
||||
event_type: foursquare.push
|
||||
action:
|
||||
service: script.turn_on
|
||||
target:
|
||||
entity_id: script.my_action
|
||||
```
|
||||
|
||||
|
@ -158,5 +158,6 @@ You can also use the `homeassistant.update_entity` service to update the sensor
|
||||
- fri
|
||||
action:
|
||||
- service: homeassistant.update_entity
|
||||
target:
|
||||
entity_id: sensor.morning_commute
|
||||
```
|
||||
|
@ -63,5 +63,6 @@ The current price for the Load Zone will appear as a sensor:
|
||||
zone: zone.home
|
||||
action:
|
||||
- service: switch.turn_off
|
||||
target:
|
||||
entity_id: switch.my_tesla_charger_switch
|
||||
```
|
||||
|
@ -79,6 +79,7 @@ Using the activity name 'Watch TV', you can call a service via automation to swi
|
||||
```yaml
|
||||
action:
|
||||
- service: remote.turn_on
|
||||
target:
|
||||
entity_id: remote.bed_room_hub
|
||||
data:
|
||||
activity: "Watch TV"
|
||||
@ -207,6 +208,7 @@ automation:
|
||||
value_template: '{{ trigger.to_state.attributes.current_activity == "Kodi" }}'
|
||||
action:
|
||||
service: input_boolean.turn_on
|
||||
target:
|
||||
entity_id: input_boolean.notify
|
||||
- alias: "PowerOff started from harmony hub"
|
||||
trigger:
|
||||
@ -217,6 +219,7 @@ automation:
|
||||
value_template: '{{ trigger.to_state.attributes.current_activity == "PowerOff" }}'
|
||||
action:
|
||||
service: input_boolean.turn_off
|
||||
target:
|
||||
entity_id: input_boolean.notify
|
||||
```
|
||||
|
||||
|
@ -176,5 +176,6 @@ automation:
|
||||
- fri
|
||||
action:
|
||||
- service: homeassistant.update_entity
|
||||
target:
|
||||
entity_id: sensor.morning_commute
|
||||
```
|
||||
|
@ -261,6 +261,7 @@ automation:
|
||||
param: PRESS_SHORT
|
||||
action:
|
||||
service: switch.turn_on
|
||||
target:
|
||||
entity_id: switch.Kitchen_Ambience
|
||||
```
|
||||
|
||||
@ -423,6 +424,7 @@ Manually set lock on KeyMatic devices:
|
||||
...
|
||||
action:
|
||||
service: lock.lock
|
||||
target:
|
||||
entity_id: lock.leq1234567
|
||||
```
|
||||
|
||||
@ -432,6 +434,7 @@ Manually set unlock on KeyMatic devices:
|
||||
...
|
||||
action:
|
||||
service: lock.unlock
|
||||
target:
|
||||
entity_id: lock.leq1234567
|
||||
```
|
||||
|
||||
|
@ -36,5 +36,6 @@ To add `Hunter Douglas PowerView` to your installation, go to **Configuration**
|
||||
at: "18:00:00"
|
||||
action:
|
||||
- service: scene.turn_on
|
||||
target:
|
||||
entity_id: scene.10877
|
||||
```
|
||||
|
@ -121,6 +121,7 @@ automation:
|
||||
at: input_datetime.bedroom_alarm_clock_time
|
||||
action:
|
||||
service: light.turn_on
|
||||
target:
|
||||
entity_id: light.bedroom
|
||||
```
|
||||
|
||||
|
@ -253,6 +253,7 @@ automation:
|
||||
action:
|
||||
- delay: "00:{{ states('input_number.minutes') | int }}:{{ states('input_number.seconds') | int }}"
|
||||
- service: switch.turn_off
|
||||
target:
|
||||
entity_id: switch.something
|
||||
```
|
||||
|
||||
|
@ -139,6 +139,7 @@ automation:
|
||||
state: "off"
|
||||
action:
|
||||
- service: light.turn_on
|
||||
target:
|
||||
entity_id: light.some_light
|
||||
|
||||
# single button remote
|
||||
@ -155,6 +156,7 @@ automation:
|
||||
state: "off"
|
||||
action:
|
||||
- service: light.turn_on
|
||||
target:
|
||||
entity_id: light.some_light
|
||||
```
|
||||
|
||||
@ -400,6 +402,7 @@ automation:
|
||||
state: "off"
|
||||
action:
|
||||
- service: light.turn_on
|
||||
target:
|
||||
entity_id: light.some_light
|
||||
|
||||
# single button remote
|
||||
@ -416,5 +419,6 @@ automation:
|
||||
state: "off"
|
||||
action:
|
||||
- service: light.turn_on
|
||||
target:
|
||||
entity_id: light.some_light
|
||||
```
|
||||
|
@ -130,6 +130,7 @@ automation:
|
||||
prec: "0"
|
||||
action:
|
||||
service: light.turn_off
|
||||
target:
|
||||
entity_id: light.lr_track_lights_rear
|
||||
```
|
||||
|
||||
|
@ -93,6 +93,7 @@ automation:
|
||||
key_code: 107 # inspect log to obtain desired keycode
|
||||
action:
|
||||
service: light.turn_on
|
||||
target:
|
||||
entity_id: light.all
|
||||
```
|
||||
|
||||
|
@ -22,6 +22,7 @@ You can then activate each scene with its name from the smartphone app:
|
||||
|
||||
```yaml
|
||||
- service: scene.turn_on
|
||||
target:
|
||||
entity_id: scene.goodnight
|
||||
```
|
||||
|
||||
|
@ -91,6 +91,7 @@ automation:
|
||||
button_name: KEY_0
|
||||
action:
|
||||
service: homeassistant.turn_off
|
||||
target:
|
||||
entity_id: group.a_lights
|
||||
```
|
||||
|
||||
|
@ -59,6 +59,7 @@ automation:
|
||||
action: call_service
|
||||
action:
|
||||
service: light.turn_on
|
||||
target:
|
||||
entity_id: light.office
|
||||
```
|
||||
|
||||
|
@ -175,6 +175,7 @@ automation:
|
||||
state: armed_away
|
||||
action:
|
||||
service: alarm_control_panel.alarm_trigger
|
||||
target:
|
||||
entity_id: alarm_control_panel.ha_alarm
|
||||
```
|
||||
|
||||
@ -205,6 +206,7 @@ automation:
|
||||
# many z-wave locks use Alarm Type 19 for 'Unlocked by Keypad'
|
||||
action:
|
||||
- service: alarm_control_panel.alarm_disarm
|
||||
target:
|
||||
entity_id: alarm_control_panel.house_alarm
|
||||
```
|
||||
|
||||
|
@ -75,6 +75,7 @@ dropdown on UI. You can apply a scene by clicking an item from the dropdown or b
|
||||
|
||||
```yaml
|
||||
- service: light.turn_on
|
||||
target:
|
||||
entity_id: light.bedroom
|
||||
data:
|
||||
effect: Romance
|
||||
|
@ -241,6 +241,7 @@ Example script:
|
||||
play_plex_on_tv:
|
||||
sequence:
|
||||
- service: media_player.select_source
|
||||
target:
|
||||
entity_id: media_player.smart_tv
|
||||
data:
|
||||
source: "Plex"
|
||||
|
@ -130,6 +130,7 @@ automation:
|
||||
at: "5:30:00"
|
||||
action:
|
||||
service: rainbird.start_irrigation
|
||||
target:
|
||||
entity_id: switch.sprinkler_1
|
||||
data:
|
||||
duration: 5
|
||||
|
@ -292,6 +292,7 @@ automation:
|
||||
Sound: 9
|
||||
action:
|
||||
service: scene.turn_on
|
||||
target:
|
||||
entity_id: scene.welcomescene
|
||||
```
|
||||
|
||||
|
@ -69,6 +69,7 @@ automation:
|
||||
to: "home"
|
||||
action:
|
||||
service: scene.turn_on
|
||||
target:
|
||||
entity_id: scene.romantic
|
||||
```
|
||||
|
||||
|
@ -169,6 +169,7 @@ automation:
|
||||
to: "on"
|
||||
action:
|
||||
service: script.turn_on
|
||||
target:
|
||||
entity_id: script.notify_pushover
|
||||
data:
|
||||
variables:
|
||||
@ -243,6 +244,7 @@ script:
|
||||
script_1:
|
||||
sequence:
|
||||
- service: script.turn_on
|
||||
target:
|
||||
entity_id: script.script_2
|
||||
# Perform some other steps here while second script runs...
|
||||
# Now wait for called script to complete.
|
||||
|
@ -81,6 +81,7 @@ If the **BUTTON TYPE** of the switch connected to the device is set to `momentar
|
||||
click_type: single
|
||||
action:
|
||||
service: light.toggle
|
||||
target:
|
||||
entity_id: light.living_room
|
||||
|
||||
- alias: "Toggle living room lamp"
|
||||
@ -93,6 +94,7 @@ If the **BUTTON TYPE** of the switch connected to the device is set to `momentar
|
||||
click_type: long
|
||||
action:
|
||||
service: light.toggle
|
||||
target:
|
||||
entity_id: light.lamp_living_room
|
||||
```
|
||||
|
||||
|
@ -56,6 +56,7 @@ The Logitech Transporter which have two digital inputs can be activated using a
|
||||
transporter_toslink:
|
||||
sequence:
|
||||
- service: homeassistant.turn_on
|
||||
target:
|
||||
entity_id: media_player.transporter
|
||||
- service: media_player.play_media
|
||||
data:
|
||||
|
@ -67,6 +67,7 @@ automation:
|
||||
at: "5:30:00"
|
||||
action:
|
||||
service: mysensors.send_ir_code
|
||||
target:
|
||||
entity_id: switch.hvac_1_1
|
||||
data:
|
||||
V_IR_SEND: "0xC284" # the IR code to send
|
||||
@ -77,6 +78,7 @@ automation:
|
||||
at: "0:30:00"
|
||||
action:
|
||||
service: mysensors.send_ir_code
|
||||
target:
|
||||
entity_id: switch.hvac_1_1
|
||||
data:
|
||||
V_IR_SEND: "0xC288" # the IR code to send
|
||||
|
@ -97,6 +97,7 @@ automation:
|
||||
level: WARNING
|
||||
action:
|
||||
service: counter.increment
|
||||
target:
|
||||
entity_id: counter.warning_counter
|
||||
```
|
||||
|
||||
|
@ -332,10 +332,12 @@ trigger:
|
||||
command: "/siren"
|
||||
action:
|
||||
- service: homeassistant.turn_on
|
||||
target:
|
||||
entity_id: switch.vision_zm1601eu5_battery_operated_siren_switch_9_0
|
||||
- delay:
|
||||
seconds: 10
|
||||
- service: homeassistant.turn_off
|
||||
target:
|
||||
entity_id: switch.vision_zm1601eu5_battery_operated_siren_switch_9_0
|
||||
```
|
||||
|
||||
|
@ -372,6 +372,7 @@ automation:
|
||||
minutes: "/5"
|
||||
action:
|
||||
- service: homeassistant.update_entity
|
||||
target:
|
||||
entity_id: sensor.random_number
|
||||
```
|
||||
|
||||
|
@ -208,5 +208,6 @@ image_processing:
|
||||
- binary_sensor.driveway
|
||||
action:
|
||||
- service: image_processing.scan
|
||||
target:
|
||||
entity_id: camera.driveway
|
||||
```
|
||||
|
@ -137,6 +137,7 @@ timer:
|
||||
to: "on"
|
||||
action:
|
||||
- service: timer.start
|
||||
target:
|
||||
entity_id: timer.test
|
||||
|
||||
# When timer is stopped, the time run out, another message is sent
|
||||
@ -163,20 +164,24 @@ script:
|
||||
alias: "Start timer"
|
||||
sequence:
|
||||
- service: timer.start
|
||||
target:
|
||||
entity_id: timer.test
|
||||
pause_timer:
|
||||
alias: "Pause timer"
|
||||
sequence:
|
||||
- service: timer.pause
|
||||
target:
|
||||
entity_id: timer.test
|
||||
cancel_timer:
|
||||
alias: "Cancel timer"
|
||||
sequence:
|
||||
- service: timer.cancel
|
||||
target:
|
||||
entity_id: timer.test
|
||||
finish_timer:
|
||||
alias: "Finish timer"
|
||||
sequence:
|
||||
- service: timer.finish
|
||||
target:
|
||||
entity_id: timer.test
|
||||
```
|
||||
|
@ -55,6 +55,7 @@ automation:
|
||||
before: sunset
|
||||
action:
|
||||
service: scene.turn_on
|
||||
target:
|
||||
entity_id: scene.OnDisarmedDaytime
|
||||
- alias: "Alarm: Armed Away"
|
||||
trigger:
|
||||
@ -63,6 +64,7 @@ automation:
|
||||
to: "armed_away"
|
||||
action:
|
||||
service: scene.turn_on
|
||||
target:
|
||||
entity_id: scene.OnArmedAway
|
||||
```
|
||||
|
||||
|
@ -59,5 +59,6 @@ automation:
|
||||
action: call_service
|
||||
action:
|
||||
service: light.turn_on
|
||||
target:
|
||||
entity_id: light.office
|
||||
```
|
||||
|
@ -219,6 +219,7 @@ automation:
|
||||
to: "playing"
|
||||
action:
|
||||
- service: media_player.turn_on
|
||||
target:
|
||||
entity_id: media_player.kodi_tv
|
||||
|
||||
- alias: "Turn off the TV when Kodi is in idle > 15 min"
|
||||
@ -230,6 +231,7 @@ automation:
|
||||
minutes: 15
|
||||
action:
|
||||
- service: media_player.turn_off
|
||||
target:
|
||||
entity_id: media_player.kodi_tv
|
||||
```
|
||||
|
||||
@ -252,18 +254,22 @@ media_player:
|
||||
commands:
|
||||
turn_on:
|
||||
service: remote.turn_on
|
||||
target:
|
||||
entity_id: remote.alexander_down_guest
|
||||
turn_off:
|
||||
service: remote.turn_off
|
||||
target:
|
||||
entity_id: remote.alexander_down_guest
|
||||
volume_up:
|
||||
service: remote.send_command
|
||||
target:
|
||||
entity_id: remote.alexander_down_guest
|
||||
data:
|
||||
device: Receiver
|
||||
command: VolumeUp
|
||||
volume_down:
|
||||
service: remote.send_command
|
||||
target:
|
||||
entity_id: remote.alexander_down_guest
|
||||
data:
|
||||
device: Receiver
|
||||
|
@ -198,6 +198,7 @@ all_lights_on:
|
||||
description: "Activate two UPB scenes named interior_lights and exterior_lights"
|
||||
sequence:
|
||||
- service: scene.turn_on
|
||||
target:
|
||||
entity_id:
|
||||
- scene.interior_lights
|
||||
- scene.exterior_lights
|
||||
@ -207,6 +208,7 @@ all_lights_off:
|
||||
description: "Deactivate two UPB scenes named interior_lights and exterior_lights"
|
||||
sequence:
|
||||
- service: upb.scene_deactivate
|
||||
target:
|
||||
entity_id:
|
||||
- scene.interior_lights
|
||||
- scene.exterior_lights
|
||||
|
@ -153,8 +153,10 @@ automation:
|
||||
at: "21:00:00"
|
||||
action:
|
||||
- service: utility_meter.next_tariff
|
||||
target:
|
||||
entity_id: utility_meter.daily_energy
|
||||
- service: utility_meter.next_tariff
|
||||
target:
|
||||
entity_id: utility_meter.monthly_energy
|
||||
```
|
||||
|
||||
|
@ -143,6 +143,7 @@ automation:
|
||||
state: "on"
|
||||
action:
|
||||
service: switch.turn_on
|
||||
target:
|
||||
entity_id: switch.heater
|
||||
```
|
||||
|
||||
|
@ -1094,6 +1094,7 @@ script:
|
||||
towel_heater:
|
||||
sequence:
|
||||
- service: remote.send_command
|
||||
target:
|
||||
entity_id: "remote.bathroom_remote"
|
||||
data:
|
||||
command:
|
||||
@ -1101,6 +1102,7 @@ script:
|
||||
please_cover_your_ears:
|
||||
sequence:
|
||||
- service: remote.send_command
|
||||
target:
|
||||
entity_id: "remote.bathroom_remote"
|
||||
data:
|
||||
command:
|
||||
|
@ -61,6 +61,7 @@ automation:
|
||||
before: sunset
|
||||
action:
|
||||
service: scene.turn_on
|
||||
target:
|
||||
entity_id: scene.OnDisarmedDaytime
|
||||
- alias: "Alarm: Armed Away"
|
||||
trigger:
|
||||
@ -69,5 +70,6 @@ automation:
|
||||
to: "armed_away"
|
||||
action:
|
||||
service: scene.turn_on
|
||||
target:
|
||||
entity_id: scene.OnArmedAway
|
||||
```
|
||||
|
@ -54,6 +54,7 @@ automation:
|
||||
before: "23:00:00"
|
||||
action:
|
||||
service: homeassistant.turn_on
|
||||
target:
|
||||
entity_id: group.living_room
|
||||
```
|
||||
|
||||
|
@ -72,6 +72,7 @@ automation:
|
||||
state: "off"
|
||||
action:
|
||||
service: switch.turn_on
|
||||
target:
|
||||
entity_id: switch.gate
|
||||
```
|
||||
|
||||
@ -90,6 +91,7 @@ automation:
|
||||
value_template: '{{ states.device_tracker.greg_gregphone.state != "home" }}'
|
||||
action:
|
||||
service: script.turn_on
|
||||
target:
|
||||
entity_id: script.send_key_alert
|
||||
|
||||
- alias: "Forgotten keys - cancel"
|
||||
@ -102,6 +104,7 @@ automation:
|
||||
state: "on"
|
||||
action:
|
||||
service: script.turn_off
|
||||
target:
|
||||
entity_id: script.send_key_alert
|
||||
```
|
||||
|
||||
|
@ -81,6 +81,7 @@ automation:
|
||||
to: "Complete"
|
||||
action:
|
||||
service: script.turn_on
|
||||
target:
|
||||
entity_id: script.washer_complete
|
||||
|
||||
- alias: "Washer emptied"
|
||||
@ -91,6 +92,7 @@ automation:
|
||||
to: "Empty"
|
||||
action:
|
||||
service: scene.turn_on
|
||||
target:
|
||||
entity_id: scene.normal
|
||||
|
||||
script:
|
||||
|
@ -80,6 +80,7 @@ automation:
|
||||
to: "on"
|
||||
action:
|
||||
service: ffmpeg.start
|
||||
target:
|
||||
entity_id: binary_sensor.ffmpeg_noise
|
||||
|
||||
- alias: "Babyphone off"
|
||||
@ -90,6 +91,7 @@ automation:
|
||||
to: "off"
|
||||
action:
|
||||
service: ffmpeg.stop
|
||||
target:
|
||||
entity_id: binary_sensor.ffmpeg_noise
|
||||
```
|
||||
|
||||
@ -107,19 +109,24 @@ automation:
|
||||
to: "on"
|
||||
action:
|
||||
- service: media_player.sonos_snapshot
|
||||
target:
|
||||
entity_id: media_player.bedroom
|
||||
- service: media_player.sonos_unjoin
|
||||
target:
|
||||
entity_id: media_player.bedroom
|
||||
- service: media_player.volume_set
|
||||
target:
|
||||
entity_id: media_player.bedroom
|
||||
data:
|
||||
volume_level: 0.4
|
||||
- service: media_player.play_media
|
||||
target:
|
||||
entity_id: media_player.bedroom
|
||||
data:
|
||||
media_content_type: "music"
|
||||
media_content_id: http://my_ip_icecast:8000/babyphone.mp3
|
||||
- service: light.turn_on:
|
||||
target:
|
||||
entity_id:
|
||||
- light.floor
|
||||
- light.bedroom
|
||||
@ -134,8 +141,10 @@ automation:
|
||||
to: "off"
|
||||
action:
|
||||
- service: media_player.sonos_restore
|
||||
target:
|
||||
entity_id: media_player.bedroom
|
||||
- service: light.turn_off:
|
||||
target:
|
||||
entity_id:
|
||||
- light.floor
|
||||
- light.bedroom
|
||||
|
@ -221,6 +221,7 @@ Experiencing issues introduced by this release? Please report them in our [issue
|
||||
entity_id: all
|
||||
action:
|
||||
service: light.turn_off
|
||||
target:
|
||||
entity_id: all
|
||||
```
|
||||
|
||||
|
@ -46,6 +46,7 @@ automation:
|
||||
action: close_garage
|
||||
action:
|
||||
service: cover.close_cover
|
||||
target:
|
||||
entity_id: cover.garage_door
|
||||
```
|
||||
|
||||
|
@ -215,6 +215,7 @@ condition:
|
||||
state: disarmed
|
||||
action:
|
||||
- service: light.turn_off
|
||||
target:
|
||||
entity_id: light.kitchen
|
||||
```
|
||||
|
||||
|
@ -80,10 +80,12 @@ automation:
|
||||
to: "on"
|
||||
action:
|
||||
- service: light.turn_on
|
||||
target:
|
||||
entity_id: light.bulb
|
||||
- delay:
|
||||
seconds: 10
|
||||
- service: light.turn_off
|
||||
target:
|
||||
entity_id: light.bulb
|
||||
```
|
||||
|
||||
@ -240,6 +242,7 @@ automation:
|
||||
state: "on"
|
||||
sequence:
|
||||
- service: light.turn_on
|
||||
target:
|
||||
entity_id: light.bulb
|
||||
- conditions:
|
||||
- condition: state
|
||||
@ -247,6 +250,7 @@ automation:
|
||||
state: "on"
|
||||
sequence:
|
||||
- service: light.turn_off
|
||||
target:
|
||||
entity_id: light.bulb
|
||||
default:
|
||||
- service: notify.frenck
|
||||
@ -284,6 +288,7 @@ script:
|
||||
count: 10
|
||||
sequence:
|
||||
- service: light.toggle
|
||||
target:
|
||||
entity_id: light.bulb
|
||||
- delay:
|
||||
milliseconds: 500
|
||||
|
@ -468,6 +468,7 @@ automation:
|
||||
state: "on"
|
||||
action:
|
||||
- service: cover.open_cover
|
||||
target:
|
||||
entity_id: cover.sonne_abstellkammer
|
||||
|
||||
- alias: "Binary sensor test counter=1 off"
|
||||
@ -483,6 +484,7 @@ automation:
|
||||
state: "off"
|
||||
action:
|
||||
- service: cover.close_cover
|
||||
target:
|
||||
entity_id: cover.sonne_abstellkammer
|
||||
```
|
||||
|
||||
|
@ -139,6 +139,7 @@ For example:
|
||||
```yaml
|
||||
action:
|
||||
service: tts.cloud_say
|
||||
target:
|
||||
entity_id: media_player.family_room_speaker
|
||||
data:
|
||||
message: These new voices sound absolutely stunning!
|
||||
|
Loading…
x
Reference in New Issue
Block a user