mirror of
https://github.com/home-assistant/home-assistant.io.git
synced 2025-07-24 01:37:23 +00:00
Update some service calls to use target (#16592)
This commit is contained in:
parent
c8bddfce04
commit
616103c28c
@ -109,7 +109,7 @@ automation:
|
|||||||
to: "None"
|
to: "None"
|
||||||
action:
|
action:
|
||||||
service: media_player.turn_off
|
service: media_player.turn_off
|
||||||
data:
|
target:
|
||||||
entity_id: >
|
entity_id: >
|
||||||
{% if is_state("input_select.radio_player", "Mansarda") %}
|
{% if is_state("input_select.radio_player", "Mansarda") %}
|
||||||
media_player.bed_2
|
media_player.bed_2
|
||||||
@ -133,7 +133,7 @@ automation:
|
|||||||
entity_id: input_select.radio_station
|
entity_id: input_select.radio_station
|
||||||
action:
|
action:
|
||||||
- service: media_player.play_media
|
- service: media_player.play_media
|
||||||
data:
|
target:
|
||||||
entity_id: >
|
entity_id: >
|
||||||
{% if is_state("input_select.radio_player", "Mansarda") %}
|
{% if is_state("input_select.radio_player", "Mansarda") %}
|
||||||
media_player.bed_2
|
media_player.bed_2
|
||||||
@ -150,6 +150,7 @@ automation:
|
|||||||
{% else %}
|
{% else %}
|
||||||
none
|
none
|
||||||
{% endif %}
|
{% endif %}
|
||||||
|
data:
|
||||||
media_content_id: >
|
media_content_id: >
|
||||||
{% if is_state("input_select.radio_station", "Z88.3") %}
|
{% if is_state("input_select.radio_station", "Z88.3") %}
|
||||||
http://ice.zradio.org/z/high.mp3
|
http://ice.zradio.org/z/high.mp3
|
||||||
|
@ -95,13 +95,14 @@ Templates can also be used for the data that you pass to the service call.
|
|||||||
|
|
||||||
```yaml
|
```yaml
|
||||||
service: thermostat.set_temperature
|
service: thermostat.set_temperature
|
||||||
data:
|
target:
|
||||||
entity_id: >
|
entity_id: >
|
||||||
{% if is_state('device_tracker.paulus', 'home') %}
|
{% if is_state('device_tracker.paulus', 'home') %}
|
||||||
thermostat.upstairs
|
thermostat.upstairs
|
||||||
{% else %}
|
{% else %}
|
||||||
thermostat.downstairs
|
thermostat.downstairs
|
||||||
{% endif %}
|
{% endif %}
|
||||||
|
data:
|
||||||
temperature: {{ 22 - distance(states.device_tracker.paulus) }}
|
temperature: {{ 22 - distance(states.device_tracker.paulus) }}
|
||||||
```
|
```
|
||||||
|
|
||||||
|
@ -42,8 +42,9 @@ automation:
|
|||||||
at: "07:15:00"
|
at: "07:15:00"
|
||||||
action:
|
action:
|
||||||
- service: fan.set_speed
|
- service: fan.set_speed
|
||||||
data:
|
target:
|
||||||
entity_id: fan.kitchen
|
entity_id: fan.kitchen
|
||||||
|
data:
|
||||||
speed: low
|
speed: low
|
||||||
```
|
```
|
||||||
|
|
||||||
@ -65,8 +66,9 @@ automation:
|
|||||||
at: "07:15:00"
|
at: "07:15:00"
|
||||||
action:
|
action:
|
||||||
- service: fan.set_direction
|
- service: fan.set_direction
|
||||||
data:
|
target:
|
||||||
entity_id: fan.kitchen
|
entity_id: fan.kitchen
|
||||||
|
data:
|
||||||
direction: forward
|
direction: forward
|
||||||
```
|
```
|
||||||
|
|
||||||
@ -88,8 +90,9 @@ automation:
|
|||||||
at: "07:15:00"
|
at: "07:15:00"
|
||||||
action:
|
action:
|
||||||
- service: fan.oscillate
|
- service: fan.oscillate
|
||||||
data:
|
target:
|
||||||
entity_id: fan.kitchen
|
entity_id: fan.kitchen
|
||||||
|
data:
|
||||||
oscillating: True
|
oscillating: True
|
||||||
```
|
```
|
||||||
|
|
||||||
|
@ -85,8 +85,9 @@ automation:
|
|||||||
to: "on"
|
to: "on"
|
||||||
action:
|
action:
|
||||||
- service: light.turn_on
|
- service: light.turn_on
|
||||||
data:
|
target:
|
||||||
entity_id: light.hyperion
|
entity_id: light.hyperion
|
||||||
|
data:
|
||||||
effect: "Full color mood blobs"
|
effect: "Full color mood blobs"
|
||||||
```
|
```
|
||||||
|
|
||||||
@ -106,8 +107,9 @@ To have the lights playing an effect when pausing, idle or turn off a media play
|
|||||||
to: "idle"
|
to: "idle"
|
||||||
action:
|
action:
|
||||||
- service: light.turn_on
|
- service: light.turn_on
|
||||||
data:
|
target:
|
||||||
entity_id: light.hyperion
|
entity_id: light.hyperion
|
||||||
|
data:
|
||||||
effect: "Full color mood blobs"
|
effect: "Full color mood blobs"
|
||||||
```
|
```
|
||||||
|
|
||||||
@ -121,7 +123,8 @@ To capture the screen when playing something on a media_player you can use this
|
|||||||
to: "playing"
|
to: "playing"
|
||||||
action:
|
action:
|
||||||
- service: light.turn_on
|
- service: light.turn_on
|
||||||
data:
|
target:
|
||||||
entity_id: light.hyperion
|
entity_id: light.hyperion
|
||||||
|
data:
|
||||||
effect: V4L
|
effect: V4L
|
||||||
```
|
```
|
||||||
|
@ -44,7 +44,7 @@ automation:
|
|||||||
platform: event
|
platform: event
|
||||||
condition: []
|
condition: []
|
||||||
action:
|
action:
|
||||||
- data:
|
- target:
|
||||||
entity_id: '{{ trigger.event.data.entity_id }}'
|
entity_id: '{{ trigger.event.data.entity_id }}'
|
||||||
service: '{{ trigger.event.data.service }}'
|
service: '{{ trigger.event.data.service }}'
|
||||||
```
|
```
|
||||||
|
@ -131,8 +131,9 @@ automation:
|
|||||||
entity_id: input_number.bedroom_brightness
|
entity_id: input_number.bedroom_brightness
|
||||||
action:
|
action:
|
||||||
- service: light.turn_on
|
- service: light.turn_on
|
||||||
data:
|
target:
|
||||||
entity_id: light.bedroom
|
entity_id: light.bedroom
|
||||||
|
data:
|
||||||
brightness: "{{ trigger.to_state.state | int }}"
|
brightness: "{{ trigger.to_state.state | int }}"
|
||||||
```
|
```
|
||||||
|
|
||||||
@ -170,8 +171,9 @@ automation:
|
|||||||
to: CUSTOM
|
to: CUSTOM
|
||||||
action:
|
action:
|
||||||
- service: light.turn_on
|
- service: light.turn_on
|
||||||
data:
|
target:
|
||||||
entity_id: light.bedroom
|
entity_id: light.bedroom
|
||||||
|
data:
|
||||||
brightness: "{{ states('input_number.bedroom_brightness') | int }}"
|
brightness: "{{ states('input_number.bedroom_brightness') | int }}"
|
||||||
```
|
```
|
||||||
|
|
||||||
@ -201,8 +203,9 @@ automation:
|
|||||||
topic: "setTemperature"
|
topic: "setTemperature"
|
||||||
action:
|
action:
|
||||||
service: input_number.set_value
|
service: input_number.set_value
|
||||||
data:
|
target:
|
||||||
entity_id: input_number.target_temp
|
entity_id: input_number.target_temp
|
||||||
|
data:
|
||||||
value: "{{ trigger.payload }}"
|
value: "{{ trigger.payload }}"
|
||||||
|
|
||||||
# This second automation script runs when the target temperature slider is moved.
|
# This second automation script runs when the target temperature slider is moved.
|
||||||
|
@ -141,8 +141,9 @@ automation:
|
|||||||
event_type: MY_CUSTOM_EVENT
|
event_type: MY_CUSTOM_EVENT
|
||||||
action:
|
action:
|
||||||
- service: input_select.select_option
|
- service: input_select.select_option
|
||||||
data:
|
target:
|
||||||
entity_id: input_select.who_cooks
|
entity_id: input_select.who_cooks
|
||||||
|
data:
|
||||||
option: Paulus
|
option: Paulus
|
||||||
```
|
```
|
||||||
|
|
||||||
@ -157,8 +158,9 @@ automation:
|
|||||||
event_type: MY_CUSTOM_EVENT
|
event_type: MY_CUSTOM_EVENT
|
||||||
action:
|
action:
|
||||||
- service: input_select.set_options
|
- service: input_select.set_options
|
||||||
data:
|
target:
|
||||||
entity_id: input_select.who_cooks
|
entity_id: input_select.who_cooks
|
||||||
|
data:
|
||||||
options: ["Item A", "Item B", "Item C"]
|
options: ["Item A", "Item B", "Item C"]
|
||||||
```
|
```
|
||||||
|
|
||||||
@ -189,9 +191,10 @@ input_select:
|
|||||||
topic: "thermostatMode"
|
topic: "thermostatMode"
|
||||||
# entity_id: input_select.thermostat_mode
|
# entity_id: input_select.thermostat_mode
|
||||||
action:
|
action:
|
||||||
service: input_select.select_option
|
service: input_select.select_option
|
||||||
data:
|
target:
|
||||||
entity_id: input_select.thermostat_mode
|
entity_id: input_select.thermostat_mode
|
||||||
|
data:
|
||||||
option: "{{ trigger.payload }}"
|
option: "{{ trigger.payload }}"
|
||||||
|
|
||||||
# This automation script runs when the thermostat mode selector is changed.
|
# This automation script runs when the thermostat mode selector is changed.
|
||||||
|
@ -133,8 +133,9 @@ automation:
|
|||||||
entity_id: input_select.scene_bedroom
|
entity_id: input_select.scene_bedroom
|
||||||
action:
|
action:
|
||||||
- service: input_text.set_value
|
- service: input_text.set_value
|
||||||
data:
|
target:
|
||||||
entity_id: input_text.bedroom
|
entity_id: input_text.bedroom
|
||||||
|
data:
|
||||||
value: "{{ states('input_select.scene_bedroom') }}"
|
value: "{{ states('input_select.scene_bedroom') }}"
|
||||||
```
|
```
|
||||||
|
|
||||||
|
@ -116,8 +116,9 @@ automation:
|
|||||||
event_type: keyboard_remote_connected
|
event_type: keyboard_remote_connected
|
||||||
action:
|
action:
|
||||||
- service: media_player.play_media
|
- service: media_player.play_media
|
||||||
data:
|
target:
|
||||||
entity_id: media_player.speaker
|
entity_id: media_player.speaker
|
||||||
|
data:
|
||||||
media_content_id: keyboard_connected.wav
|
media_content_id: keyboard_connected.wav
|
||||||
media_content_type: music
|
media_content_type: music
|
||||||
|
|
||||||
@ -129,8 +130,9 @@ automation:
|
|||||||
device_name: "00:58:56:4C:C0:91"
|
device_name: "00:58:56:4C:C0:91"
|
||||||
action:
|
action:
|
||||||
- service: media_player.play_media
|
- service: media_player.play_media
|
||||||
data:
|
target:
|
||||||
entity_id: media_player.speaker
|
entity_id: media_player.speaker
|
||||||
|
data:
|
||||||
media_content_id: keyboard_disconnected.wav
|
media_content_id: keyboard_disconnected.wav
|
||||||
media_content_type: music
|
media_content_type: music
|
||||||
```
|
```
|
||||||
|
@ -128,8 +128,9 @@ script:
|
|||||||
kodi_quit:
|
kodi_quit:
|
||||||
sequence:
|
sequence:
|
||||||
- service: kodi.call_method
|
- service: kodi.call_method
|
||||||
data:
|
target:
|
||||||
entity_id: media_player.kodi
|
entity_id: media_player.kodi
|
||||||
|
data:
|
||||||
method: Application.Quit
|
method: Application.Quit
|
||||||
```
|
```
|
||||||
|
|
||||||
@ -140,8 +141,9 @@ script:
|
|||||||
kodi_hibernate:
|
kodi_hibernate:
|
||||||
sequence:
|
sequence:
|
||||||
- service: kodi.call_method
|
- service: kodi.call_method
|
||||||
data:
|
target:
|
||||||
entity_id: media_player.kodi
|
entity_id: media_player.kodi
|
||||||
|
data:
|
||||||
method: System.Hibernate
|
method: System.Hibernate
|
||||||
```
|
```
|
||||||
|
|
||||||
@ -152,8 +154,9 @@ script:
|
|||||||
kodi_suspend:
|
kodi_suspend:
|
||||||
sequence:
|
sequence:
|
||||||
- service: kodi.call_method
|
- service: kodi.call_method
|
||||||
data:
|
target:
|
||||||
entity_id: media_player.kodi
|
entity_id: media_player.kodi
|
||||||
|
data:
|
||||||
method: System.Suspend
|
method: System.Suspend
|
||||||
```
|
```
|
||||||
|
|
||||||
@ -164,8 +167,9 @@ script:
|
|||||||
kodi_reboot:
|
kodi_reboot:
|
||||||
sequence:
|
sequence:
|
||||||
- service: kodi.call_method
|
- service: kodi.call_method
|
||||||
data:
|
target:
|
||||||
entity_id: media_player.kodi
|
entity_id: media_player.kodi
|
||||||
|
data:
|
||||||
method: System.Reboot
|
method: System.Reboot
|
||||||
```
|
```
|
||||||
|
|
||||||
@ -176,8 +180,9 @@ script:
|
|||||||
kodi_shutdown:
|
kodi_shutdown:
|
||||||
sequence:
|
sequence:
|
||||||
- service: kodi.call_method
|
- service: kodi.call_method
|
||||||
data:
|
target:
|
||||||
entity_id: media_player.kodi
|
entity_id: media_player.kodi
|
||||||
|
data:
|
||||||
method: System.Shutdown
|
method: System.Shutdown
|
||||||
```
|
```
|
||||||
|
|
||||||
@ -190,8 +195,9 @@ script:
|
|||||||
turn_on_kodi_with_cec:
|
turn_on_kodi_with_cec:
|
||||||
sequence:
|
sequence:
|
||||||
- service: kodi.call_method
|
- service: kodi.call_method
|
||||||
data:
|
target:
|
||||||
entity_id: media_player.kodi
|
entity_id: media_player.kodi
|
||||||
|
data:
|
||||||
method: Addons.ExecuteAddon
|
method: Addons.ExecuteAddon
|
||||||
addonid: script.json-cec
|
addonid: script.json-cec
|
||||||
params:
|
params:
|
||||||
@ -200,11 +206,12 @@ script:
|
|||||||
turn_off_kodi_with_cec:
|
turn_off_kodi_with_cec:
|
||||||
sequence:
|
sequence:
|
||||||
- service: media_player.media_stop
|
- service: media_player.media_stop
|
||||||
data:
|
target:
|
||||||
entity_id: media_player.kodi
|
entity_id: media_player.kodi
|
||||||
- service: kodi.call_method
|
- service: kodi.call_method
|
||||||
data:
|
target:
|
||||||
entity_id: media_player.kodi
|
entity_id: media_player.kodi
|
||||||
|
data:
|
||||||
method: Addons.ExecuteAddon
|
method: Addons.ExecuteAddon
|
||||||
addonid: script.json-cec
|
addonid: script.json-cec
|
||||||
params:
|
params:
|
||||||
@ -230,12 +237,13 @@ script:
|
|||||||
sequence:
|
sequence:
|
||||||
- alias: "TV on"
|
- alias: "TV on"
|
||||||
service: media_player.turn_on
|
service: media_player.turn_on
|
||||||
data:
|
target:
|
||||||
entity_id: media_player.kodi
|
entity_id: media_player.kodi
|
||||||
- alias: "Play TV channel"
|
- alias: "Play TV channel"
|
||||||
service: media_player.play_media
|
service: media_player.play_media
|
||||||
data:
|
target:
|
||||||
entity_id: media_player.kodi
|
entity_id: media_player.kodi
|
||||||
|
data:
|
||||||
media_content_type: "CHANNEL"
|
media_content_type: "CHANNEL"
|
||||||
media_content_id: >
|
media_content_id: >
|
||||||
{% if (now().hour < 14) or ((now().hour == 14) and (now().minute < 50)) %}
|
{% if (now().hour < 14) or ((now().hour == 14) and (now().minute < 50)) %}
|
||||||
@ -266,11 +274,12 @@ script:
|
|||||||
sequence:
|
sequence:
|
||||||
- alias: "TV on"
|
- alias: "TV on"
|
||||||
service: media_player.turn_on
|
service: media_player.turn_on
|
||||||
data:
|
target:
|
||||||
entity_id: media_player.kodi
|
entity_id: media_player.kodi
|
||||||
- service: media_player.play_media
|
- service: media_player.play_media
|
||||||
data:
|
target:
|
||||||
entity_id: media_player.kodi
|
entity_id: media_player.kodi
|
||||||
|
data:
|
||||||
media_content_type: DIRECTORY
|
media_content_type: DIRECTORY
|
||||||
media_content_id: special://profile/playlists/video/feuerwehrmann_sam.xsp
|
media_content_id: special://profile/playlists/video/feuerwehrmann_sam.xsp
|
||||||
```
|
```
|
||||||
@ -286,8 +295,9 @@ script:
|
|||||||
sequence:
|
sequence:
|
||||||
- alias: "Call Kodi update"
|
- alias: "Call Kodi update"
|
||||||
service: kodi.call_method
|
service: kodi.call_method
|
||||||
data:
|
target:
|
||||||
entity_id: media_player.kodi
|
entity_id: media_player.kodi
|
||||||
|
data:
|
||||||
method: VideoLibrary.Scan
|
method: VideoLibrary.Scan
|
||||||
```
|
```
|
||||||
|
|
||||||
|
@ -58,6 +58,6 @@ media_player:
|
|||||||
host: 192.168.0.20
|
host: 192.168.0.20
|
||||||
turn_on_action:
|
turn_on_action:
|
||||||
service: switch.turn_on
|
service: switch.turn_on
|
||||||
data:
|
target:
|
||||||
entity_id: switch.tv_switch
|
entity_id: switch.tv_switch
|
||||||
```
|
```
|
||||||
|
@ -47,8 +47,9 @@ automation:
|
|||||||
# ...
|
# ...
|
||||||
action:
|
action:
|
||||||
- service: light.turn_on
|
- service: light.turn_on
|
||||||
data:
|
target:
|
||||||
entity_id: light.office, light.kitchen
|
entity_id: light.office, light.kitchen
|
||||||
|
data:
|
||||||
effect: lifx_effect_pulse
|
effect: lifx_effect_pulse
|
||||||
```
|
```
|
||||||
|
|
||||||
@ -59,8 +60,9 @@ script:
|
|||||||
alias: "Start colorloop"
|
alias: "Start colorloop"
|
||||||
sequence:
|
sequence:
|
||||||
- service: lifx.effect_colorloop
|
- service: lifx.effect_colorloop
|
||||||
data:
|
target:
|
||||||
entity_id: group.livingroom
|
entity_id: group.livingroom
|
||||||
|
data:
|
||||||
brightness: 255
|
brightness: 255
|
||||||
period: 10
|
period: 10
|
||||||
spread: 30
|
spread: 30
|
||||||
|
@ -53,7 +53,8 @@ script:
|
|||||||
alias: "Kitchen lights on"
|
alias: "Kitchen lights on"
|
||||||
sequence:
|
sequence:
|
||||||
service: light.turn_on
|
service: light.turn_on
|
||||||
data:
|
target:
|
||||||
entity_id: light.kitchen_lights
|
entity_id: light.kitchen_lights
|
||||||
|
data:
|
||||||
brightness: 100
|
brightness: 100
|
||||||
```
|
```
|
||||||
|
@ -59,8 +59,9 @@ automation:
|
|||||||
to: "on"
|
to: "on"
|
||||||
action:
|
action:
|
||||||
- service: light.turn_on
|
- service: light.turn_on
|
||||||
data:
|
target:
|
||||||
entity_id: light.living_room
|
entity_id: light.living_room
|
||||||
|
data:
|
||||||
brightness: 255
|
brightness: 255
|
||||||
kelvin: 2700
|
kelvin: 2700
|
||||||
```
|
```
|
||||||
@ -73,8 +74,9 @@ automation:
|
|||||||
platform: time
|
platform: time
|
||||||
action:
|
action:
|
||||||
- service: light.turn_on
|
- service: light.turn_on
|
||||||
data:
|
target:
|
||||||
entity_id: light.ledliststair
|
entity_id: light.ledliststair
|
||||||
|
data:
|
||||||
brightness: 130
|
brightness: 130
|
||||||
rgb_color: [255,0,0]
|
rgb_color: [255,0,0]
|
||||||
```
|
```
|
||||||
|
@ -178,18 +178,21 @@ light:
|
|||||||
{% endif %}
|
{% endif %}
|
||||||
turn_on:
|
turn_on:
|
||||||
service: media_player.volume_mute
|
service: media_player.volume_mute
|
||||||
data:
|
target:
|
||||||
entity_id: media_player.receiver
|
entity_id: media_player.receiver
|
||||||
|
data:
|
||||||
is_volume_muted: false
|
is_volume_muted: false
|
||||||
turn_off:
|
turn_off:
|
||||||
service: media_player.volume_mute
|
service: media_player.volume_mute
|
||||||
data:
|
target:
|
||||||
entity_id: media_player.receiver
|
entity_id: media_player.receiver
|
||||||
|
data:
|
||||||
is_volume_muted: true
|
is_volume_muted: true
|
||||||
set_level:
|
set_level:
|
||||||
service: media_player.volume_set
|
service: media_player.volume_set
|
||||||
data:
|
target:
|
||||||
entity_id: media_player.receiver
|
entity_id: media_player.receiver
|
||||||
|
data:
|
||||||
volume_level: "{{ (brightness / 255 * 100)|int / 100 }}"
|
volume_level: "{{ (brightness / 255 * 100)|int / 100 }}"
|
||||||
level_template: >-
|
level_template: >-
|
||||||
{% if is_state('media_player.receiver', 'on') %}
|
{% if is_state('media_player.receiver', 'on') %}
|
||||||
@ -235,13 +238,15 @@ light:
|
|||||||
{% endif %}
|
{% endif %}
|
||||||
turn_on:
|
turn_on:
|
||||||
service: media_player.volume_mute
|
service: media_player.volume_mute
|
||||||
data:
|
target:
|
||||||
entity_id: media_player.receiver
|
entity_id: media_player.receiver
|
||||||
|
data:
|
||||||
is_volume_muted: false
|
is_volume_muted: false
|
||||||
turn_off:
|
turn_off:
|
||||||
service: media_player.volume_mute
|
service: media_player.volume_mute
|
||||||
data:
|
target:
|
||||||
entity_id: media_player.receiver
|
entity_id: media_player.receiver
|
||||||
|
data:
|
||||||
is_volume_muted: true
|
is_volume_muted: true
|
||||||
```
|
```
|
||||||
|
|
||||||
@ -281,13 +286,15 @@ light:
|
|||||||
{% endif %}
|
{% endif %}
|
||||||
turn_on:
|
turn_on:
|
||||||
service: media_player.volume_mute
|
service: media_player.volume_mute
|
||||||
data:
|
target:
|
||||||
entity_id: media_player.receiver
|
entity_id: media_player.receiver
|
||||||
|
data:
|
||||||
is_volume_muted: false
|
is_volume_muted: false
|
||||||
turn_off:
|
turn_off:
|
||||||
service: media_player.volume_mute
|
service: media_player.volume_mute
|
||||||
data:
|
target:
|
||||||
entity_id: media_player.receiver
|
entity_id: media_player.receiver
|
||||||
|
data:
|
||||||
is_volume_muted: true
|
is_volume_muted: true
|
||||||
```
|
```
|
||||||
|
|
||||||
|
@ -111,8 +111,11 @@ automation:
|
|||||||
# ...
|
# ...
|
||||||
action:
|
action:
|
||||||
- service: light.turn_on
|
- service: light.turn_on
|
||||||
|
target:
|
||||||
|
entity_id:
|
||||||
|
- light.office
|
||||||
|
- light.kitchen
|
||||||
data:
|
data:
|
||||||
entity_id: light.office, light.kitchen
|
|
||||||
effect: night
|
effect: night
|
||||||
```
|
```
|
||||||
|
|
||||||
|
@ -31,7 +31,7 @@ Lock your door, the attribute should appear under a 'data' attribute for the ser
|
|||||||
```yaml
|
```yaml
|
||||||
action:
|
action:
|
||||||
service: lock.lock
|
service: lock.lock
|
||||||
data:
|
target:
|
||||||
entity_id: lock.my_place
|
entity_id: lock.my_place
|
||||||
```
|
```
|
||||||
|
|
||||||
@ -48,7 +48,7 @@ Unlock your door, the attribute should appear under a 'data' attribute for the s
|
|||||||
```yaml
|
```yaml
|
||||||
action:
|
action:
|
||||||
service: lock.unlock
|
service: lock.unlock
|
||||||
data:
|
target:
|
||||||
entity_id: lock.my_place
|
entity_id: lock.my_place
|
||||||
```
|
```
|
||||||
|
|
||||||
|
@ -31,11 +31,11 @@ lock:
|
|||||||
value_template: "{{ is_state('sensor.door', 'on') }}"
|
value_template: "{{ is_state('sensor.door', 'on') }}"
|
||||||
lock:
|
lock:
|
||||||
service: switch.turn_on
|
service: switch.turn_on
|
||||||
data:
|
target:
|
||||||
entity_id: switch.door
|
entity_id: switch.door
|
||||||
unlock:
|
unlock:
|
||||||
service: switch.turn_off
|
service: switch.turn_off
|
||||||
data:
|
target:
|
||||||
entity_id: switch.door
|
entity_id: switch.door
|
||||||
```
|
```
|
||||||
|
|
||||||
@ -96,11 +96,11 @@ lock:
|
|||||||
value_template: "{{ is_state('switch.source', 'on') }}"
|
value_template: "{{ is_state('switch.source', 'on') }}"
|
||||||
lock:
|
lock:
|
||||||
service: switch.turn_on
|
service: switch.turn_on
|
||||||
data:
|
target:
|
||||||
entity_id: switch.source
|
entity_id: switch.source
|
||||||
unlock:
|
unlock:
|
||||||
service: switch.turn_off
|
service: switch.turn_off
|
||||||
data:
|
target:
|
||||||
entity_id: switch.source
|
entity_id: switch.source
|
||||||
```
|
```
|
||||||
|
|
||||||
@ -120,11 +120,11 @@ lock:
|
|||||||
optimistic: true
|
optimistic: true
|
||||||
lock:
|
lock:
|
||||||
service: switch.turn_on
|
service: switch.turn_on
|
||||||
data:
|
target:
|
||||||
entity_id: switch.source
|
entity_id: switch.source
|
||||||
unlock:
|
unlock:
|
||||||
service: switch.turn_off
|
service: switch.turn_off
|
||||||
data:
|
target:
|
||||||
entity_id: switch.source
|
entity_id: switch.source
|
||||||
```
|
```
|
||||||
|
|
||||||
@ -143,11 +143,11 @@ lock:
|
|||||||
value_template: "{{ is_state('sensor.skylight.state', 'on') }}"
|
value_template: "{{ is_state('sensor.skylight.state', 'on') }}"
|
||||||
lock:
|
lock:
|
||||||
service: switch.turn_on
|
service: switch.turn_on
|
||||||
data:
|
target:
|
||||||
entity_id: switch.skylight_open
|
entity_id: switch.skylight_open
|
||||||
unlock:
|
unlock:
|
||||||
service: switch.turn_on
|
service: switch.turn_on
|
||||||
data:
|
target:
|
||||||
entity_id: switch.skylight_close
|
entity_id: switch.skylight_close
|
||||||
```
|
```
|
||||||
|
|
||||||
|
@ -65,8 +65,9 @@ Default `media_dir`is `local`.
|
|||||||
Example:
|
Example:
|
||||||
```yaml
|
```yaml
|
||||||
service: media_player.play_media
|
service: media_player.play_media
|
||||||
data:
|
target:
|
||||||
entity_id: media_player.living_room_tv
|
entity_id: media_player.living_room_tv
|
||||||
|
data:
|
||||||
media_content_type: video/mp4
|
media_content_type: video/mp4
|
||||||
media_content_id: media-source://media_source/local/videos/favourites/Epic Sax Guy 10 Hours.mp4
|
media_content_id: media-source://media_source/local/videos/favourites/Epic Sax Guy 10 Hours.mp4
|
||||||
```
|
```
|
||||||
|
@ -63,8 +63,9 @@ The `play_media` function can be used in scripts to change channels:
|
|||||||
change_channel:
|
change_channel:
|
||||||
sequence:
|
sequence:
|
||||||
service: media_player.play_media
|
service: media_player.play_media
|
||||||
data:
|
target:
|
||||||
entity_id: media_player.mediaroom_stb
|
entity_id: media_player.mediaroom_stb
|
||||||
|
data:
|
||||||
media_content_id: "{{ channel_number }}"
|
media_content_id: "{{ channel_number }}"
|
||||||
media_content_type: "channel"
|
media_content_type: "channel"
|
||||||
```
|
```
|
||||||
@ -81,8 +82,9 @@ The `play_media` function can also be used to trigger actions on the set-up-box
|
|||||||
press_button:
|
press_button:
|
||||||
sequence:
|
sequence:
|
||||||
service: media_player.play_media
|
service: media_player.play_media
|
||||||
data:
|
target:
|
||||||
entity_id: media_player.mediaroom_stb
|
entity_id: media_player.mediaroom_stb
|
||||||
|
data:
|
||||||
media_content_id: "{{ action }}"
|
media_content_id: "{{ action }}"
|
||||||
media_content_type: "mediaroom"
|
media_content_type: "mediaroom"
|
||||||
```
|
```
|
||||||
|
@ -50,14 +50,16 @@ Example script to load a saved playlist called "DeckMusic" and set the volume:
|
|||||||
relaxdeck:
|
relaxdeck:
|
||||||
sequence:
|
sequence:
|
||||||
- service: media_player.play_media
|
- service: media_player.play_media
|
||||||
data:
|
target:
|
||||||
entity_id: media_player.main
|
entity_id: media_player.main
|
||||||
|
data:
|
||||||
media_content_type: playlist
|
media_content_type: playlist
|
||||||
media_content_id: DeckMusic
|
media_content_id: DeckMusic
|
||||||
|
|
||||||
- service: media_player.volume_set
|
- service: media_player.volume_set
|
||||||
data:
|
target:
|
||||||
entity_id: media_player.main
|
entity_id: media_player.main
|
||||||
|
data:
|
||||||
volume_level: 0.60
|
volume_level: 0.60
|
||||||
```
|
```
|
||||||
|
|
||||||
|
@ -34,14 +34,15 @@ The state is the last reading from Nightscout, and you can see other information
|
|||||||
alias: "overnight_low_kitchen_lights"
|
alias: "overnight_low_kitchen_lights"
|
||||||
description: Turn on the lights in the kitchen if my blood sugar drops low overnight
|
description: Turn on the lights in the kitchen if my blood sugar drops low overnight
|
||||||
trigger:
|
trigger:
|
||||||
- below: "65"
|
- platform: numeric_state
|
||||||
entity_id: sensor.blood_glucose
|
entity_id: sensor.blood_glucose
|
||||||
platform: numeric_state
|
below: "65"
|
||||||
condition: time
|
condition:
|
||||||
after: "22:00:00"
|
- condition: time
|
||||||
before: "06:00:00"
|
after: "22:00:00"
|
||||||
|
before: "06:00:00"
|
||||||
action:
|
action:
|
||||||
- service: light.turn_on
|
- service: light.turn_on
|
||||||
data:
|
target:
|
||||||
entity_id: light.kitchen
|
entity_id: light.kitchen
|
||||||
```
|
```
|
||||||
|
@ -123,11 +123,12 @@ script:
|
|||||||
alias: "Radio 1"
|
alias: "Radio 1"
|
||||||
sequence:
|
sequence:
|
||||||
- service: media_player.turn_on
|
- service: media_player.turn_on
|
||||||
data:
|
target:
|
||||||
entity_id: media_player.onkyo
|
entity_id: media_player.onkyo
|
||||||
- service: media_player.play_media
|
- service: media_player.play_media
|
||||||
data:
|
target:
|
||||||
entity_id: media_player.onkyo
|
entity_id: media_player.onkyo
|
||||||
|
data:
|
||||||
media_content_type: "radio"
|
media_content_type: "radio"
|
||||||
media_content_id: "1"
|
media_content_id: "1"
|
||||||
```
|
```
|
||||||
|
@ -25,9 +25,9 @@ media_player:
|
|||||||
```yaml
|
```yaml
|
||||||
action:
|
action:
|
||||||
- service: media_player.play_media
|
- service: media_player.play_media
|
||||||
|
target:
|
||||||
|
entity_id: media_player.linn_bedroom
|
||||||
data:
|
data:
|
||||||
entity_id:
|
|
||||||
- media_player.linn_bedroom
|
|
||||||
media_content_id: "http://172.24.32.13/Doorbell.mp3"
|
media_content_id: "http://172.24.32.13/Doorbell.mp3"
|
||||||
media_content_type: music
|
media_content_type: music
|
||||||
```
|
```
|
||||||
@ -36,9 +36,9 @@ action:
|
|||||||
|
|
||||||
```yaml
|
```yaml
|
||||||
- service: media_player.play_media
|
- service: media_player.play_media
|
||||||
|
target:
|
||||||
|
entity_id: media_player.linn_bedroom
|
||||||
data:
|
data:
|
||||||
entity_id:
|
|
||||||
- media_player.linn_bedroom
|
|
||||||
media_content_id: "http://media-ice.musicradio.com:80/ClassicFMMP3"
|
media_content_id: "http://media-ice.musicradio.com:80/ClassicFMMP3"
|
||||||
media_content_type: music
|
media_content_type: music
|
||||||
```
|
```
|
||||||
|
@ -74,17 +74,18 @@ script:
|
|||||||
alias: "Show who's at the door"
|
alias: "Show who's at the door"
|
||||||
sequence:
|
sequence:
|
||||||
- service: media_player.turn_on
|
- service: media_player.turn_on
|
||||||
data:
|
target:
|
||||||
entity_id: media_player.living_room_tv
|
entity_id: media_player.living_room_tv
|
||||||
- service: media_player.play_media
|
- service: media_player.play_media
|
||||||
data:
|
target:
|
||||||
entity_id: media_player.living_room_tv
|
entity_id: media_player.living_room_tv
|
||||||
|
data:
|
||||||
media_content_type: "url"
|
media_content_type: "url"
|
||||||
media_content_id: YOUR_URL
|
media_content_id: YOUR_URL
|
||||||
- delay:
|
- delay:
|
||||||
seconds: 5
|
seconds: 5
|
||||||
- service: media_player.media_stop
|
- service: media_player.media_stop
|
||||||
data:
|
target:
|
||||||
entity_id: media_player.living_room_tv
|
entity_id: media_player.living_room_tv
|
||||||
```
|
```
|
||||||
|
|
||||||
|
@ -250,8 +250,9 @@ play_plex_on_tv:
|
|||||||
timeout: "00:00:10"
|
timeout: "00:00:10"
|
||||||
continue_on_timeout: false
|
continue_on_timeout: false
|
||||||
- service: media_player.play_media
|
- service: media_player.play_media
|
||||||
data:
|
target:
|
||||||
entity_id: media_player.plex_smart_tv
|
entity_id: media_player.plex_smart_tv
|
||||||
|
data:
|
||||||
media_content_id: "{"library_name": "Movies", "title": "Zoolander"}"
|
media_content_id: "{"library_name": "Movies", "title": "Zoolander"}"
|
||||||
media_content_type: movie
|
media_content_type: movie
|
||||||
```
|
```
|
||||||
|
@ -70,7 +70,7 @@ script:
|
|||||||
force_adam_update:
|
force_adam_update:
|
||||||
sequence:
|
sequence:
|
||||||
- service: homeassistant.update_entity
|
- service: homeassistant.update_entity
|
||||||
data:
|
target:
|
||||||
entity_id: climate.anna
|
entity_id: climate.anna
|
||||||
```
|
```
|
||||||
|
|
||||||
@ -89,8 +89,9 @@ script:
|
|||||||
lisa_reactive_last_schedule:
|
lisa_reactive_last_schedule:
|
||||||
sequence:
|
sequence:
|
||||||
- service: climate.set_hvac_mode
|
- service: climate.set_hvac_mode
|
||||||
data:
|
target:
|
||||||
entity_id: climate.lisa_bios
|
entity_id: climate.lisa_bios
|
||||||
|
data:
|
||||||
hvac_mode: auto
|
hvac_mode: auto
|
||||||
```
|
```
|
||||||
|
|
||||||
@ -113,8 +114,9 @@ script:
|
|||||||
anna_set_predefined_temperature:
|
anna_set_predefined_temperature:
|
||||||
sequence:
|
sequence:
|
||||||
- service: climate.set_temperature
|
- service: climate.set_temperature
|
||||||
data:
|
target:
|
||||||
entity_id: climate.anna
|
entity_id: climate.anna
|
||||||
|
data:
|
||||||
temperature: 19.5
|
temperature: 19.5
|
||||||
```
|
```
|
||||||
|
|
||||||
|
@ -67,9 +67,10 @@ if entity_id is not None:
|
|||||||
The above `python_script` can be called using the following YAML as an input.
|
The above `python_script` can be called using the following YAML as an input.
|
||||||
|
|
||||||
```yaml
|
```yaml
|
||||||
service: python_script.turn_on_light
|
- service: python_script.turn_on_light
|
||||||
data:
|
target:
|
||||||
entity_id: light.bedroom
|
entity_id: light.bedroom
|
||||||
|
data:
|
||||||
rgb_color: [255, 0, 0]
|
rgb_color: [255, 0, 0]
|
||||||
```
|
```
|
||||||
|
|
||||||
|
@ -88,11 +88,12 @@ script:
|
|||||||
run_grass_zones:
|
run_grass_zones:
|
||||||
sequence:
|
sequence:
|
||||||
- service: rachio.start_multiple_zone_schedule
|
- service: rachio.start_multiple_zone_schedule
|
||||||
data:
|
target:
|
||||||
entity_id:
|
entity_id:
|
||||||
- switch.front_yard_west
|
- switch.front_yard_west
|
||||||
- switch.front_yard_east
|
- switch.front_yard_east
|
||||||
- switch.side_yard_west
|
- switch.side_yard_west
|
||||||
|
data:
|
||||||
duration: 20, 15, 10
|
duration: 20, 15, 10
|
||||||
```
|
```
|
||||||
|
|
||||||
@ -102,11 +103,12 @@ script:
|
|||||||
run_grass_zones:
|
run_grass_zones:
|
||||||
sequence:
|
sequence:
|
||||||
- service: rachio.start_multiple_zone_schedule
|
- service: rachio.start_multiple_zone_schedule
|
||||||
data:
|
target:
|
||||||
entity_id:
|
entity_id:
|
||||||
- switch.front_yard_west
|
- switch.front_yard_west
|
||||||
- switch.front_yard_east
|
- switch.front_yard_east
|
||||||
- switch.side_yard_west
|
- switch.side_yard_west
|
||||||
|
data:
|
||||||
duration: 20
|
duration: 20
|
||||||
```
|
```
|
||||||
### Service `rachio.set_zone_moisture_percent`
|
### Service `rachio.set_zone_moisture_percent`
|
||||||
|
@ -453,22 +453,22 @@ switch:
|
|||||||
data:
|
data:
|
||||||
led: 6
|
led: 6
|
||||||
- service: homeassistant.update_entity
|
- service: homeassistant.update_entity
|
||||||
data:
|
target:
|
||||||
entity_id: sensor.steam_system_data
|
entity_id: sensor.steam_system_data
|
||||||
- delay: 00:00:15
|
- delay: 00:00:15
|
||||||
- service: homeassistant.update_entity
|
- service: homeassistant.update_entity
|
||||||
data:
|
target:
|
||||||
entity_id: sensor.steam_system_data
|
entity_id: sensor.steam_system_data
|
||||||
turn_off:
|
turn_off:
|
||||||
- service: rest_command.set_steam_led
|
- service: rest_command.set_steam_led
|
||||||
data:
|
data:
|
||||||
led: 7
|
led: 7
|
||||||
- service: homeassistant.update_entity
|
- service: homeassistant.update_entity
|
||||||
data:
|
target:
|
||||||
entity_id: sensor.steam_system_data
|
entity_id: sensor.steam_system_data
|
||||||
- delay: 00:00:15
|
- delay: 00:00:15
|
||||||
- service: homeassistant.update_entity
|
- service: homeassistant.update_entity
|
||||||
data:
|
target:
|
||||||
entity_id: sensor.steam_system_data
|
entity_id: sensor.steam_system_data
|
||||||
friendly_name: Steam
|
friendly_name: Steam
|
||||||
|
|
||||||
|
@ -67,8 +67,9 @@ A typical service call for pressing several buttons looks like this.
|
|||||||
|
|
||||||
```yaml
|
```yaml
|
||||||
service: remote.send_command
|
service: remote.send_command
|
||||||
data:
|
target:
|
||||||
entity_id: remote.roku
|
entity_id: remote.roku
|
||||||
|
data:
|
||||||
command:
|
command:
|
||||||
- left
|
- left
|
||||||
- left
|
- left
|
||||||
@ -80,8 +81,9 @@ data:
|
|||||||
When the Home Assistant Roku integration is enabled and a Roku device has been configured, in the Home Assistant UI the Roku media player will show a listing of the installed channels, or apps, under “source”. Select one and it will attempt to launch the channel on your Roku device. This action can also be automated. Channels can be launched by `name` using a configuration similar to the one below:
|
When the Home Assistant Roku integration is enabled and a Roku device has been configured, in the Home Assistant UI the Roku media player will show a listing of the installed channels, or apps, under “source”. Select one and it will attempt to launch the channel on your Roku device. This action can also be automated. Channels can be launched by `name` using a configuration similar to the one below:
|
||||||
```yaml
|
```yaml
|
||||||
action:
|
action:
|
||||||
- data:
|
- target:
|
||||||
entity_id: media_player.roku
|
entity_id: media_player.
|
||||||
|
data:
|
||||||
source: "Prime Video"
|
source: "Prime Video"
|
||||||
service: media_player.select_source
|
service: media_player.select_source
|
||||||
```
|
```
|
||||||
@ -106,21 +108,23 @@ To use this information in Home Assistant, the format is as follows. Note that `
|
|||||||
|
|
||||||
```yaml
|
```yaml
|
||||||
action:
|
action:
|
||||||
- data:
|
- service: media_player.select_source
|
||||||
entity_id: media_player.roku
|
target:
|
||||||
source: 20197
|
entity_id: media_player.roku
|
||||||
service: media_player.select_source
|
data:
|
||||||
|
source: 20197
|
||||||
```
|
```
|
||||||
|
|
||||||
It is also possible to tune directly to specific channels if you have a Roku TV and use an OTA antenna. This service only supports `media_channel_type` of 'channel'. `media_content_id` corresponds to the TV channel, which you should see when navigating to these on your TV UI.
|
It is also possible to tune directly to specific channels if you have a Roku TV and use an OTA antenna. This service only supports `media_channel_type` of 'channel'. `media_content_id` corresponds to the TV channel, which you should see when navigating to these on your TV UI.
|
||||||
|
|
||||||
```yaml
|
```yaml
|
||||||
action:
|
action:
|
||||||
- data:
|
- service: media_player.play_media
|
||||||
entity_id: media_player.roku
|
target:
|
||||||
media_content_id: 5.1
|
entity_id: media_player.roku
|
||||||
media_content_type: channel
|
data:
|
||||||
service: media_player.play_media
|
media_content_id: 5.1
|
||||||
|
media_content_type: channel
|
||||||
```
|
```
|
||||||
|
|
||||||
## Remote
|
## Remote
|
||||||
|
@ -173,6 +173,6 @@ For example:
|
|||||||
to: "on"
|
to: "on"
|
||||||
action:
|
action:
|
||||||
service: input_boolean.turn_on
|
service: input_boolean.turn_on
|
||||||
data:
|
target:
|
||||||
entity_id: input_boolean.movement_detected
|
entity_id: input_boolean.movement_detected
|
||||||
```
|
```
|
||||||
|
@ -116,8 +116,9 @@ automation:
|
|||||||
to: "home"
|
to: "home"
|
||||||
action:
|
action:
|
||||||
service: scene.turn_on
|
service: scene.turn_on
|
||||||
data:
|
target:
|
||||||
entity_id: scene.romantic
|
entity_id: scene.romantic
|
||||||
|
data:
|
||||||
transition: 2.5
|
transition: 2.5
|
||||||
```
|
```
|
||||||
|
|
||||||
@ -176,11 +177,12 @@ The following example turns off some entities as soon as a window opens. The sta
|
|||||||
- climate.ecobee
|
- climate.ecobee
|
||||||
- light.ceiling_lights
|
- light.ceiling_lights
|
||||||
- service: light.turn_off
|
- service: light.turn_off
|
||||||
data:
|
target:
|
||||||
entity_id: light.ceiling_lights
|
entity_id: light.ceiling_lights
|
||||||
- service: climate.set_hvac_mode
|
- service: climate.set_hvac_mode
|
||||||
data:
|
target:
|
||||||
entity_id: climate.ecobee
|
entity_id: climate.ecobee
|
||||||
|
data:
|
||||||
hvac_mode: "off"
|
hvac_mode: "off"
|
||||||
- alias: "Window closed"
|
- alias: "Window closed"
|
||||||
trigger:
|
trigger:
|
||||||
@ -191,6 +193,6 @@ The following example turns off some entities as soon as a window opens. The sta
|
|||||||
condition: []
|
condition: []
|
||||||
action:
|
action:
|
||||||
- service: scene.turn_on
|
- service: scene.turn_on
|
||||||
data:
|
target:
|
||||||
entity_id: scene.before
|
entity_id: scene.before
|
||||||
```
|
```
|
||||||
|
@ -139,15 +139,16 @@ script:
|
|||||||
domain: light
|
domain: light
|
||||||
- alias: "Bedroom lights on"
|
- alias: "Bedroom lights on"
|
||||||
service: light.turn_on
|
service: light.turn_on
|
||||||
data:
|
target:
|
||||||
entity_id: group.bedroom
|
entity_id: group.bedroom
|
||||||
|
data:
|
||||||
brightness: 100
|
brightness: 100
|
||||||
- delay:
|
- delay:
|
||||||
# supports seconds, milliseconds, minutes, hours
|
# supports seconds, milliseconds, minutes, hours
|
||||||
minutes: "{{ minutes }}"
|
minutes: "{{ minutes }}"
|
||||||
- alias: "Living room lights on"
|
- alias: "Living room lights on"
|
||||||
service: light.turn_on
|
service: light.turn_on
|
||||||
data:
|
target:
|
||||||
entity_id: "{{ turn_on_entity }}"
|
entity_id: "{{ turn_on_entity }}"
|
||||||
```
|
```
|
||||||
|
|
||||||
|
@ -66,13 +66,14 @@ switch:
|
|||||||
value_template: "{{ is_state('climate.ac', 'cool') or is_state('climate.ac', 'heat') or is_state('climate.ac', 'dry') or is_state('climate.ac', 'fan_only') }}"
|
value_template: "{{ is_state('climate.ac', 'cool') or is_state('climate.ac', 'heat') or is_state('climate.ac', 'dry') or is_state('climate.ac', 'fan_only') }}"
|
||||||
turn_on:
|
turn_on:
|
||||||
service: climate.set_hvac_mode
|
service: climate.set_hvac_mode
|
||||||
data:
|
target:
|
||||||
entity_id: climate.ac
|
entity_id: climate.ac
|
||||||
hvac_mode: cool
|
hvac_mode: cool
|
||||||
turn_off:
|
turn_off:
|
||||||
service: climate.set_hvac_mode
|
service: climate.set_hvac_mode
|
||||||
data:
|
target:
|
||||||
entity_id: climate.ac
|
entity_id: climate.ac
|
||||||
|
data:
|
||||||
hvac_mode: off
|
hvac_mode: off
|
||||||
```
|
```
|
||||||
|
|
||||||
|
@ -153,8 +153,9 @@ intent_script:
|
|||||||
ActivateLightColor:
|
ActivateLightColor:
|
||||||
action:
|
action:
|
||||||
- service: light.turn_on
|
- service: light.turn_on
|
||||||
data:
|
target:
|
||||||
entity_id: 'light.{{ objectLocation | replace(" ","_") }}'
|
entity_id: 'light.{{ objectLocation | replace(" ","_") }}'
|
||||||
|
data:
|
||||||
color_name: "{{ objectColor }}"
|
color_name: "{{ objectColor }}"
|
||||||
```
|
```
|
||||||
|
|
||||||
@ -236,7 +237,7 @@ intent_script:
|
|||||||
text: "OK, opening the garage door"
|
text: "OK, opening the garage door"
|
||||||
action:
|
action:
|
||||||
- service: cover.open_cover
|
- service: cover.open_cover
|
||||||
data:
|
target:
|
||||||
entity_id: garage_door
|
entity_id: garage_door
|
||||||
```
|
```
|
||||||
|
|
||||||
|
@ -164,9 +164,10 @@ condition:
|
|||||||
{{ trigger.from_state.attributes.queue_position < trigger.to_state.attributes.queue_position }}
|
{{ trigger.from_state.attributes.queue_position < trigger.to_state.attributes.queue_position }}
|
||||||
action:
|
action:
|
||||||
- service: sonos.remove_from_queue
|
- service: sonos.remove_from_queue
|
||||||
data:
|
target:
|
||||||
entity_id: >
|
entity_id: >
|
||||||
{{ trigger.entity_id }}
|
{{ trigger.entity_id }}
|
||||||
|
data:
|
||||||
queue_position: >
|
queue_position: >
|
||||||
{{ trigger.from_state.attributes.queue_position }}
|
{{ trigger.from_state.attributes.queue_position }}
|
||||||
```
|
```
|
||||||
|
@ -60,8 +60,9 @@ You can switch between one of your 6 pre-configured presets using ```media_playe
|
|||||||
```yaml
|
```yaml
|
||||||
# Play media preset
|
# Play media preset
|
||||||
- service: media_player.play_media
|
- service: media_player.play_media
|
||||||
data:
|
target:
|
||||||
entity_id: media_player.soundtouch_living_room
|
entity_id: media_player.soundtouch_living_room
|
||||||
|
data:
|
||||||
media_content_id: 1..6
|
media_content_id: 1..6
|
||||||
media_content_type: PLAYLIST
|
media_content_type: PLAYLIST
|
||||||
```
|
```
|
||||||
@ -71,8 +72,9 @@ You can also play HTTP (not HTTPS) URLs:
|
|||||||
```yaml
|
```yaml
|
||||||
# Play media URL
|
# Play media URL
|
||||||
- service: media_player.play_media
|
- service: media_player.play_media
|
||||||
data:
|
target:
|
||||||
entity_id: media_player.soundtouch_living_room
|
entity_id: media_player.soundtouch_living_room
|
||||||
|
data:
|
||||||
media_content_id: http://example.com/music.mp3
|
media_content_id: http://example.com/music.mp3
|
||||||
media_content_type: MUSIC
|
media_content_type: MUSIC
|
||||||
```
|
```
|
||||||
|
@ -96,8 +96,9 @@ script:
|
|||||||
play_jazz_guitar:
|
play_jazz_guitar:
|
||||||
sequence:
|
sequence:
|
||||||
- service: media_player.play_media
|
- service: media_player.play_media
|
||||||
data:
|
target:
|
||||||
entity_id: media_player.spotify
|
entity_id: media_player.spotify
|
||||||
|
data:
|
||||||
media_content_id: "https://open.spotify.com/playlist/5xddIVAtLrZKtt4YGLM1SQ?si=YcvRqaKNTxOi043Qn4LYkg"
|
media_content_id: "https://open.spotify.com/playlist/5xddIVAtLrZKtt4YGLM1SQ?si=YcvRqaKNTxOi043Qn4LYkg"
|
||||||
media_content_type: playlist
|
media_content_type: playlist
|
||||||
```
|
```
|
||||||
|
@ -30,8 +30,9 @@ transporter_toslink:
|
|||||||
target:
|
target:
|
||||||
entity_id: media_player.transporter
|
entity_id: media_player.transporter
|
||||||
- service: media_player.play_media
|
- service: media_player.play_media
|
||||||
data:
|
target:
|
||||||
entity_id: media_player.transporter
|
entity_id: media_player.transporter
|
||||||
|
data:
|
||||||
media_content_id: "source:toslink"
|
media_content_id: "source:toslink"
|
||||||
media_content_type: "music"
|
media_content_type: "music"
|
||||||
```
|
```
|
||||||
|
@ -47,8 +47,9 @@ For example, the following action in an automation would take a recording from `
|
|||||||
```yaml
|
```yaml
|
||||||
action:
|
action:
|
||||||
service: camera.record
|
service: camera.record
|
||||||
data:
|
target:
|
||||||
entity_id: camera.quintal
|
entity_id: camera.quintal
|
||||||
|
data:
|
||||||
filename: "/config/www/my_stream.mp4"
|
filename: "/config/www/my_stream.mp4"
|
||||||
duration: 30
|
duration: 30
|
||||||
```
|
```
|
||||||
|
@ -30,11 +30,11 @@ switch:
|
|||||||
value_template: "{{ is_state('sensor.skylight', 'on') }}"
|
value_template: "{{ is_state('sensor.skylight', 'on') }}"
|
||||||
turn_on:
|
turn_on:
|
||||||
service: switch.turn_on
|
service: switch.turn_on
|
||||||
data:
|
target:
|
||||||
entity_id: switch.skylight_open
|
entity_id: switch.skylight_open
|
||||||
turn_off:
|
turn_off:
|
||||||
service: switch.turn_off
|
service: switch.turn_off
|
||||||
data:
|
target:
|
||||||
entity_id: switch.skylight_close
|
entity_id: switch.skylight_close
|
||||||
```
|
```
|
||||||
|
|
||||||
@ -104,11 +104,11 @@ switch:
|
|||||||
value_template: "{{ is_state('switch.source', 'on') }}"
|
value_template: "{{ is_state('switch.source', 'on') }}"
|
||||||
turn_on:
|
turn_on:
|
||||||
service: switch.turn_on
|
service: switch.turn_on
|
||||||
data:
|
target:
|
||||||
entity_id: switch.target
|
entity_id: switch.target
|
||||||
turn_off:
|
turn_off:
|
||||||
service: switch.turn_off
|
service: switch.turn_off
|
||||||
data:
|
target:
|
||||||
entity_id: switch.target
|
entity_id: switch.target
|
||||||
```
|
```
|
||||||
|
|
||||||
@ -129,11 +129,11 @@ switch:
|
|||||||
value_template: "{{ is_state_attr('switch.blind_toggle', 'sensor_state', 'on') }}"
|
value_template: "{{ is_state_attr('switch.blind_toggle', 'sensor_state', 'on') }}"
|
||||||
turn_on:
|
turn_on:
|
||||||
service: switch.toggle
|
service: switch.toggle
|
||||||
data:
|
target:
|
||||||
entity_id: switch.blind_toggle
|
entity_id: switch.blind_toggle
|
||||||
turn_off:
|
turn_off:
|
||||||
service: switch.toggle
|
service: switch.toggle
|
||||||
data:
|
target:
|
||||||
entity_id: switch.blind_toggle
|
entity_id: switch.blind_toggle
|
||||||
```
|
```
|
||||||
|
|
||||||
@ -155,11 +155,11 @@ switch:
|
|||||||
value_template: "{{ is_state('sensor.skylight', 'on') }}"
|
value_template: "{{ is_state('sensor.skylight', 'on') }}"
|
||||||
turn_on:
|
turn_on:
|
||||||
service: switch.turn_on
|
service: switch.turn_on
|
||||||
data:
|
target:
|
||||||
entity_id: switch.skylight_open
|
entity_id: switch.skylight_open
|
||||||
turn_off:
|
turn_off:
|
||||||
service: switch.turn_on
|
service: switch.turn_on
|
||||||
data:
|
target:
|
||||||
entity_id: switch.skylight_close
|
entity_id: switch.skylight_close
|
||||||
```
|
```
|
||||||
|
|
||||||
@ -179,11 +179,11 @@ switch:
|
|||||||
value_template: "{{ is_state('cover.garage_door', 'on') }}"
|
value_template: "{{ is_state('cover.garage_door', 'on') }}"
|
||||||
turn_on:
|
turn_on:
|
||||||
service: cover.open_cover
|
service: cover.open_cover
|
||||||
data:
|
target:
|
||||||
entity_id: cover.garage_door
|
entity_id: cover.garage_door
|
||||||
turn_off:
|
turn_off:
|
||||||
service: cover.close_cover
|
service: cover.close_cover
|
||||||
data:
|
target:
|
||||||
entity_id: cover.garage_door
|
entity_id: cover.garage_door
|
||||||
icon_template: >-
|
icon_template: >-
|
||||||
{% if is_state('cover.garage_door', 'open') %}
|
{% if is_state('cover.garage_door', 'open') %}
|
||||||
@ -209,11 +209,11 @@ switch:
|
|||||||
value_template: "{{ is_state('cover.garage_door', 'on') }}"
|
value_template: "{{ is_state('cover.garage_door', 'on') }}"
|
||||||
turn_on:
|
turn_on:
|
||||||
service: cover.open_cover
|
service: cover.open_cover
|
||||||
data:
|
target:
|
||||||
entity_id: cover.garage_door
|
entity_id: cover.garage_door
|
||||||
turn_off:
|
turn_off:
|
||||||
service: cover.close_cover
|
service: cover.close_cover
|
||||||
data:
|
target:
|
||||||
entity_id: cover.garage_door
|
entity_id: cover.garage_door
|
||||||
entity_picture_template: >-
|
entity_picture_template: >-
|
||||||
{% if is_state('cover.garage_door', 'open') %}
|
{% if is_state('cover.garage_door', 'open') %}
|
||||||
|
@ -152,13 +152,15 @@ script:
|
|||||||
boost_heating:
|
boost_heating:
|
||||||
sequence:
|
sequence:
|
||||||
- service: tado.set_climate_timer
|
- service: tado.set_climate_timer
|
||||||
data:
|
target:
|
||||||
entity_id: climate.heating
|
entity_id: climate.heating
|
||||||
|
data:
|
||||||
time_period: "01:30:00"
|
time_period: "01:30:00"
|
||||||
temperature: 25
|
temperature: 25
|
||||||
- service: tado.set_water_heater_timer
|
- service: tado.set_water_heater_timer
|
||||||
data:
|
target:
|
||||||
entity_id: water_heater.hot_water
|
entity_id: water_heater.hot_water
|
||||||
|
data:
|
||||||
time_period: "01:30:00"
|
time_period: "01:30:00"
|
||||||
```
|
```
|
||||||
|
|
||||||
@ -184,8 +186,9 @@ automation:
|
|||||||
# Work out what the new offset should be (tado temp less the room temp but add the current offset value) and turn that to a negative value for setting as the new offset
|
# Work out what the new offset should be (tado temp less the room temp but add the current offset value) and turn that to a negative value for setting as the new offset
|
||||||
action:
|
action:
|
||||||
- service: tado.set_climate_temperature_offset
|
- service: tado.set_climate_temperature_offset
|
||||||
data:
|
target:
|
||||||
entity_id: climate.tado
|
entity_id: climate.tado
|
||||||
|
data:
|
||||||
offset: >
|
offset: >
|
||||||
{% set tado_temp = states('sensor.tado_temperature')|float %}
|
{% set tado_temp = states('sensor.tado_temperature')|float %}
|
||||||
{% set room_temp = states('sensor.temp_sensor_room')|float %}
|
{% set room_temp = states('sensor.temp_sensor_room')|float %}
|
||||||
|
@ -81,8 +81,9 @@ automation:
|
|||||||
media_content_id: "{{ tags[trigger.event.data.tag_id].media_content_id }}"
|
media_content_id: "{{ tags[trigger.event.data.tag_id].media_content_id }}"
|
||||||
media_content_type: "{{ tags[trigger.event.data.tag_id].media_content_type }}"
|
media_content_type: "{{ tags[trigger.event.data.tag_id].media_content_type }}"
|
||||||
- service: media_player.play_media
|
- service: media_player.play_media
|
||||||
data:
|
target:
|
||||||
entity_id: "{{ media_player_entity_id }}"
|
entity_id: "{{ media_player_entity_id }}"
|
||||||
|
data:
|
||||||
media_content_id: "{{ media_content_id }}"
|
media_content_id: "{{ media_content_id }}"
|
||||||
media_content_type: "{{ media_content_type }}"
|
media_content_type: "{{ media_content_type }}"
|
||||||
- delay: 2 # timeout before we allow processing next scan
|
- delay: 2 # timeout before we allow processing next scan
|
||||||
|
@ -97,33 +97,35 @@ media_player:
|
|||||||
commands:
|
commands:
|
||||||
turn_on:
|
turn_on:
|
||||||
service: switch.turn_on
|
service: switch.turn_on
|
||||||
data:
|
target:
|
||||||
entity_id: switch.living_room_tv
|
entity_id: switch.living_room_tv
|
||||||
turn_off:
|
turn_off:
|
||||||
service: switch.turn_off
|
service: switch.turn_off
|
||||||
data:
|
target:
|
||||||
entity_id: switch.living_room_tv
|
entity_id: switch.living_room_tv
|
||||||
volume_up:
|
volume_up:
|
||||||
service: switch.turn_on
|
service: switch.turn_on
|
||||||
data:
|
target:
|
||||||
entity_id: switch.living_room_volume_up
|
entity_id: switch.living_room_volume_up
|
||||||
volume_down:
|
volume_down:
|
||||||
service: switch.turn_on
|
service: switch.turn_on
|
||||||
data:
|
target:
|
||||||
entity_id: switch.living_room_volume_down
|
entity_id: switch.living_room_volume_down
|
||||||
volume_mute:
|
volume_mute:
|
||||||
service: switch.turn_on
|
service: switch.turn_on
|
||||||
data:
|
target:
|
||||||
entity_id: switch.living_room_mute
|
entity_id: switch.living_room_mute
|
||||||
select_source:
|
select_source:
|
||||||
service: media_player.select_source
|
service: media_player.select_source
|
||||||
data:
|
target:
|
||||||
entity_id: media_player.receiver
|
entity_id: media_player.receiver
|
||||||
|
data:
|
||||||
source: "{{ source }}"
|
source: "{{ source }}"
|
||||||
volume_set:
|
volume_set:
|
||||||
service: media_player.volume_set
|
service: media_player.volume_set
|
||||||
data:
|
target:
|
||||||
entity_id: media_player.receiver
|
entity_id: media_player.receiver
|
||||||
|
data:
|
||||||
volume_level: "{{ volume_level }}"
|
volume_level: "{{ volume_level }}"
|
||||||
|
|
||||||
attributes:
|
attributes:
|
||||||
@ -171,11 +173,11 @@ media_player:
|
|||||||
commands:
|
commands:
|
||||||
turn_on:
|
turn_on:
|
||||||
service: media_player.turn_on
|
service: media_player.turn_on
|
||||||
data:
|
target:
|
||||||
entity_id: media_player.kodi
|
entity_id: media_player.kodi
|
||||||
turn_off:
|
turn_off:
|
||||||
service: media_player.turn_off
|
service: media_player.turn_off
|
||||||
data:
|
target:
|
||||||
entity_id: media_player.kodi
|
entity_id: media_player.kodi
|
||||||
attributes:
|
attributes:
|
||||||
is_volume_muted: media_player.kodi|is_volume_muted
|
is_volume_muted: media_player.kodi|is_volume_muted
|
||||||
@ -186,25 +188,27 @@ media_player:
|
|||||||
host: 192.168.1.10
|
host: 192.168.1.10
|
||||||
turn_on_action:
|
turn_on_action:
|
||||||
- service: input_boolean.turn_on
|
- service: input_boolean.turn_on
|
||||||
data:
|
target:
|
||||||
entity_id: input_boolean.kodi_tv_state
|
entity_id: input_boolean.kodi_tv_state
|
||||||
- service: media_player.kodi_call_method
|
- service: media_player.kodi_call_method
|
||||||
data:
|
target:
|
||||||
entity_id: media_player.kodi
|
entity_id: media_player.kodi
|
||||||
|
data:
|
||||||
method: Addons.ExecuteAddon
|
method: Addons.ExecuteAddon
|
||||||
addonid: script.json-cec
|
addonid: script.json-cec
|
||||||
params:
|
params:
|
||||||
command: activate
|
command: activate
|
||||||
turn_off_action:
|
turn_off_action:
|
||||||
- service: input_boolean.turn_off
|
- service: input_boolean.turn_off
|
||||||
data:
|
target:
|
||||||
entity_id: input_boolean.kodi_tv_state
|
entity_id: input_boolean.kodi_tv_state
|
||||||
- service: media_player.media_stop
|
- service: media_player.media_stop
|
||||||
data:
|
target:
|
||||||
entity_id: media_player.kodi
|
entity_id: media_player.kodi
|
||||||
- service: media_player.kodi_call_method
|
- service: media_player.kodi_call_method
|
||||||
data:
|
target:
|
||||||
entity_id: media_player.kodi
|
entity_id: media_player.kodi
|
||||||
|
data:
|
||||||
method: Addons.ExecuteAddon
|
method: Addons.ExecuteAddon
|
||||||
addonid: script.json-cec
|
addonid: script.json-cec
|
||||||
params:
|
params:
|
||||||
@ -276,8 +280,9 @@ media_player:
|
|||||||
command: VolumeDown
|
command: VolumeDown
|
||||||
select_source:
|
select_source:
|
||||||
service: remote.turn_on
|
service: remote.turn_on
|
||||||
data:
|
target:
|
||||||
entity_id: remote.alexander_down_guest
|
entity_id: remote.alexander_down_guest
|
||||||
|
data:
|
||||||
activity: "{{ source }}"
|
activity: "{{ source }}"
|
||||||
```
|
```
|
||||||
|
|
||||||
|
@ -218,8 +218,9 @@ kitchen_fade_on:
|
|||||||
description: "Turn on kitchen light to 75% over a period of 10 seconds"
|
description: "Turn on kitchen light to 75% over a period of 10 seconds"
|
||||||
sequence:
|
sequence:
|
||||||
- service: upb.light_fade_start
|
- service: upb.light_fade_start
|
||||||
data:
|
target:
|
||||||
entity_id: light.kitchen
|
entity_id: light.kitchen
|
||||||
|
data:
|
||||||
brightness_pct: 75
|
brightness_pct: 75
|
||||||
rate: 10
|
rate: 10
|
||||||
```
|
```
|
||||||
|
@ -526,8 +526,9 @@ Service trigger example:
|
|||||||
entity_id: sensor.sensor
|
entity_id: sensor.sensor
|
||||||
action:
|
action:
|
||||||
service: vacuum.send_command
|
service: vacuum.send_command
|
||||||
data:
|
target:
|
||||||
entity_id: vacuum.vacuum_entity
|
entity_id: vacuum.vacuum_entity
|
||||||
|
data:
|
||||||
command: "custom_command"
|
command: "custom_command"
|
||||||
params:
|
params:
|
||||||
- key: value
|
- key: value
|
||||||
@ -601,8 +602,9 @@ Service trigger example:
|
|||||||
entity_id: sensor.sensor
|
entity_id: sensor.sensor
|
||||||
action:
|
action:
|
||||||
service: vacuum.send_command
|
service: vacuum.send_command
|
||||||
data:
|
target:
|
||||||
entity_id: vacuum.vacuum_entity
|
entity_id: vacuum.vacuum_entity
|
||||||
|
data:
|
||||||
command: "custom_command"
|
command: "custom_command"
|
||||||
params:
|
params:
|
||||||
- key: value
|
- key: value
|
||||||
|
@ -116,20 +116,23 @@ vacuum:
|
|||||||
living_room_vacuum:
|
living_room_vacuum:
|
||||||
start:
|
start:
|
||||||
- service: remote.send_command
|
- service: remote.send_command
|
||||||
data:
|
target:
|
||||||
entity_id: remote.harmony_hub
|
entity_id: remote.harmony_hub
|
||||||
|
data:
|
||||||
command: Clean
|
command: Clean
|
||||||
device: 52840686
|
device: 52840686
|
||||||
return_to_base:
|
return_to_base:
|
||||||
- service: remote.send_command
|
- service: remote.send_command
|
||||||
data:
|
target:
|
||||||
entity_id: remote.harmony_hub
|
entity_id: remote.harmony_hub
|
||||||
|
data:
|
||||||
command: Home
|
command: Home
|
||||||
device: 52840686
|
device: 52840686
|
||||||
clean_spot:
|
clean_spot:
|
||||||
- service: remote.send_command
|
- service: remote.send_command
|
||||||
data:
|
target:
|
||||||
entity_id: remote.harmony_hub
|
entity_id: remote.harmony_hub
|
||||||
|
data:
|
||||||
command: SpotCleaning
|
command: SpotCleaning
|
||||||
device: 52840686
|
device: 52840686
|
||||||
```
|
```
|
||||||
|
@ -85,8 +85,9 @@ automation:
|
|||||||
platform: state
|
platform: state
|
||||||
action:
|
action:
|
||||||
- service: input_select.select_option
|
- service: input_select.select_option
|
||||||
data:
|
target:
|
||||||
entity_id: input_select.ventilation_profile
|
entity_id: input_select.ventilation_profile
|
||||||
|
data:
|
||||||
option: "{{ states('sensor.vallox_current_profile') }}"
|
option: "{{ states('sensor.vallox_current_profile') }}"
|
||||||
```
|
```
|
||||||
|
|
||||||
|
@ -118,8 +118,9 @@ For example, the following action in an automation would send an `hls` live stre
|
|||||||
```yaml
|
```yaml
|
||||||
action:
|
action:
|
||||||
service: camera.play_stream
|
service: camera.play_stream
|
||||||
data:
|
target:
|
||||||
entity_id: camera.yourcamera
|
entity_id: camera.yourcamera
|
||||||
|
data:
|
||||||
media_player: media_player.chromecast
|
media_player: media_player.chromecast
|
||||||
```
|
```
|
||||||
|
|
||||||
@ -157,8 +158,9 @@ For example, the following action is an automation that would take a snapshot fr
|
|||||||
```yaml
|
```yaml
|
||||||
action:
|
action:
|
||||||
service: camera.snapshot
|
service: camera.snapshot
|
||||||
data:
|
target:
|
||||||
entity_id: camera.front_door_camera
|
entity_id: camera.front_door_camera
|
||||||
|
data:
|
||||||
filename: '/tmp/yourcamera_{{ now().strftime("%Y%m%d-%H%M%S") }}.jpg'
|
filename: '/tmp/yourcamera_{{ now().strftime("%Y%m%d-%H%M%S") }}.jpg'
|
||||||
```
|
```
|
||||||
|
|
||||||
|
@ -47,8 +47,9 @@ automation:
|
|||||||
at: "07:15:00"
|
at: "07:15:00"
|
||||||
action:
|
action:
|
||||||
- service: water_heater.set_temperature
|
- service: water_heater.set_temperature
|
||||||
data:
|
target:
|
||||||
entity_id: water_heater.demo
|
entity_id: water_heater.demo
|
||||||
|
data:
|
||||||
temperature: 24
|
temperature: 24
|
||||||
operation_mode: eco
|
operation_mode: eco
|
||||||
```
|
```
|
||||||
@ -71,8 +72,9 @@ automation:
|
|||||||
at: "07:15:00"
|
at: "07:15:00"
|
||||||
action:
|
action:
|
||||||
- service: water_heater.set_operation_mode
|
- service: water_heater.set_operation_mode
|
||||||
data:
|
target:
|
||||||
entity_id: water_heater.demo
|
entity_id: water_heater.demo
|
||||||
|
data:
|
||||||
operation_mode: eco
|
operation_mode: eco
|
||||||
```
|
```
|
||||||
|
|
||||||
@ -94,7 +96,8 @@ automation:
|
|||||||
at: "07:15:00"
|
at: "07:15:00"
|
||||||
action:
|
action:
|
||||||
- service: water_heater.set_away_mode
|
- service: water_heater.set_away_mode
|
||||||
data:
|
target:
|
||||||
entity_id: water_heater.demo
|
entity_id: water_heater.demo
|
||||||
|
data:
|
||||||
away_mode: true
|
away_mode: true
|
||||||
```
|
```
|
||||||
|
@ -85,8 +85,9 @@ Say to the `media_player.living_room` device entity:
|
|||||||
|
|
||||||
```yaml
|
```yaml
|
||||||
- service: tts.watson_tts_say
|
- service: tts.watson_tts_say
|
||||||
data:
|
target:
|
||||||
entity_id: media_player.living_room
|
entity_id: media_player.living_room
|
||||||
|
data:
|
||||||
message: >
|
message: >
|
||||||
<speak>
|
<speak>
|
||||||
Hello from Watson
|
Hello from Watson
|
||||||
|
@ -149,15 +149,17 @@ The `play_media` service can be used in a script to switch to the specified TV c
|
|||||||
```yaml
|
```yaml
|
||||||
# Example action entry in script to switch to channel number 1
|
# Example action entry in script to switch to channel number 1
|
||||||
service: media_player.play_media
|
service: media_player.play_media
|
||||||
data:
|
target:
|
||||||
entity_id: media_player.lg_webos_smart_tv
|
entity_id: media_player.lg_webos_smart_tv
|
||||||
|
data:
|
||||||
media_content_id: 1
|
media_content_id: 1
|
||||||
media_content_type: "channel"
|
media_content_type: "channel"
|
||||||
|
|
||||||
# Example action entry in script to switch to channel including 'TF1' in its name
|
# Example action entry in script to switch to channel including 'TF1' in its name
|
||||||
service: media_player.play_media
|
service: media_player.play_media
|
||||||
data:
|
target:
|
||||||
entity_id: media_player.lg_webos_smart_tv
|
entity_id: media_player.lg_webos_smart_tv
|
||||||
|
data:
|
||||||
media_content_id: "TF1"
|
media_content_id: "TF1"
|
||||||
media_content_type: "channel"
|
media_content_type: "channel"
|
||||||
```
|
```
|
||||||
@ -207,15 +209,17 @@ script:
|
|||||||
home_button:
|
home_button:
|
||||||
sequence:
|
sequence:
|
||||||
- service: webostv.button
|
- service: webostv.button
|
||||||
data:
|
target:
|
||||||
entity_id: media_player.lg_webos_smart_tv
|
entity_id: media_player.lg_webos_smart_tv
|
||||||
|
data:
|
||||||
button: "HOME"
|
button: "HOME"
|
||||||
|
|
||||||
open_google_command:
|
open_google_command:
|
||||||
sequence:
|
sequence:
|
||||||
- service: webostv.command
|
- service: webostv.command
|
||||||
data:
|
target:
|
||||||
entity_id: media_player.lg_webos_smart_tv
|
entity_id: media_player.lg_webos_smart_tv
|
||||||
|
data:
|
||||||
command: "system.launcher/open"
|
command: "system.launcher/open"
|
||||||
payload:
|
payload:
|
||||||
target: https://www.google.com
|
target: https://www.google.com
|
||||||
|
@ -349,8 +349,9 @@ script:
|
|||||||
set_dial_1_value:
|
set_dial_1_value:
|
||||||
sequence:
|
sequence:
|
||||||
- service: wink.set_nimbus_dial_state
|
- service: wink.set_nimbus_dial_state
|
||||||
data:
|
target:
|
||||||
entity_id: wink.nimbus_dial_1
|
entity_id: wink.nimbus_dial_1
|
||||||
|
data:
|
||||||
value: 150
|
value: 150
|
||||||
labels:
|
labels:
|
||||||
- "Dial 1"
|
- "Dial 1"
|
||||||
@ -379,8 +380,9 @@ script:
|
|||||||
set_dial_1_value:
|
set_dial_1_value:
|
||||||
sequence:
|
sequence:
|
||||||
- service: wink.set_nimbus_dial_state
|
- service: wink.set_nimbus_dial_state
|
||||||
data:
|
target:
|
||||||
entity_id: wink.nimbus_dial_1
|
entity_id: wink.nimbus_dial_1
|
||||||
|
data:
|
||||||
rotation: "ccw"
|
rotation: "ccw"
|
||||||
```
|
```
|
||||||
|
|
||||||
|
@ -121,8 +121,9 @@ You can automate changing the effect using a service call like this:
|
|||||||
|
|
||||||
```yaml
|
```yaml
|
||||||
service: wled.effect
|
service: wled.effect
|
||||||
data:
|
target:
|
||||||
entity_id: light.wled
|
entity_id: light.wled
|
||||||
|
data:
|
||||||
effect: "{{ state_attr('light.wled', 'effect_list') | random }}"
|
effect: "{{ state_attr('light.wled', 'effect_list') | random }}"
|
||||||
```
|
```
|
||||||
|
|
||||||
@ -148,8 +149,9 @@ In this case (using WLED v0.11.0) there are 54 palettes, so the following servic
|
|||||||
|
|
||||||
```yaml
|
```yaml
|
||||||
service: wled.effect
|
service: wled.effect
|
||||||
data:
|
target:
|
||||||
entity_id: light.wled
|
entity_id: light.wled
|
||||||
|
data:
|
||||||
palette: "{{ range(0,53) | random }}"
|
palette: "{{ range(0,53) | random }}"
|
||||||
```
|
```
|
||||||
|
|
||||||
|
@ -202,7 +202,7 @@ This example toggles the living room lamp on a double click of the button.
|
|||||||
click_type: double
|
click_type: double
|
||||||
action:
|
action:
|
||||||
service: light.toggle
|
service: light.toggle
|
||||||
data:
|
target:
|
||||||
entity_id: light.living_room_lamp
|
entity_id: light.living_room_lamp
|
||||||
```
|
```
|
||||||
|
|
||||||
|
@ -1299,8 +1299,9 @@ automation:
|
|||||||
condition: []
|
condition: []
|
||||||
action:
|
action:
|
||||||
- service: xiaomi_miio.vacuum_clean_zone
|
- service: xiaomi_miio.vacuum_clean_zone
|
||||||
data:
|
target:
|
||||||
entity_id: vacuum.xiaomi_vacuum
|
entity_id: vacuum.xiaomi_vacuum
|
||||||
|
data:
|
||||||
repeats: "{{states('input_number.vacuum_passes')|int}}"
|
repeats: "{{states('input_number.vacuum_passes')|int}}"
|
||||||
zone: [[30914,26007,35514,28807], [20232,22496,26032,26496]]
|
zone: [[30914,26007,35514,28807], [20232,22496,26032,26496]]
|
||||||
```
|
```
|
||||||
@ -1319,8 +1320,9 @@ automation:
|
|||||||
condition: []
|
condition: []
|
||||||
action:
|
action:
|
||||||
- service: xiaomi_miio.vacuum_clean_zone
|
- service: xiaomi_miio.vacuum_clean_zone
|
||||||
data:
|
target:
|
||||||
entity_id: vacuum.xiaomi_vacuum
|
entity_id: vacuum.xiaomi_vacuum
|
||||||
|
data:
|
||||||
repeats: "{{states('input_number.vacuum_passes')|int}}"
|
repeats: "{{states('input_number.vacuum_passes')|int}}"
|
||||||
zone:
|
zone:
|
||||||
- [30914,26007,35514,28807]
|
- [30914,26007,35514,28807]
|
||||||
@ -1340,8 +1342,9 @@ automation:
|
|||||||
condition: []
|
condition: []
|
||||||
action:
|
action:
|
||||||
- service: xiaomi_miio.vacuum_clean_zone
|
- service: xiaomi_miio.vacuum_clean_zone
|
||||||
data:
|
target:
|
||||||
entity_id: vacuum.xiaomi_vacuum
|
entity_id: vacuum.xiaomi_vacuum
|
||||||
|
data:
|
||||||
repeats: 1
|
repeats: 1
|
||||||
zone:
|
zone:
|
||||||
- - 30914
|
- - 30914
|
||||||
@ -1385,8 +1388,9 @@ automation:
|
|||||||
condition: []
|
condition: []
|
||||||
action:
|
action:
|
||||||
- service: xiaomi_miio.vacuum_clean_segment
|
- service: xiaomi_miio.vacuum_clean_segment
|
||||||
data:
|
target:
|
||||||
entity_id: vacuum.xiaomi_vacuum
|
entity_id: vacuum.xiaomi_vacuum
|
||||||
|
data:
|
||||||
segments: [1,2]
|
segments: [1,2]
|
||||||
```
|
```
|
||||||
|
|
||||||
@ -1401,8 +1405,9 @@ automation:
|
|||||||
condition: []
|
condition: []
|
||||||
action:
|
action:
|
||||||
- service: xiaomi_miio.vacuum_clean_segment
|
- service: xiaomi_miio.vacuum_clean_segment
|
||||||
data:
|
target:
|
||||||
entity_id: vacuum.xiaomi_vacuum
|
entity_id: vacuum.xiaomi_vacuum
|
||||||
|
data:
|
||||||
segments: 1
|
segments: 1
|
||||||
```
|
```
|
||||||
|
|
||||||
@ -1451,8 +1456,9 @@ vacuum_kitchen:
|
|||||||
alias: "Clean the kitchen"
|
alias: "Clean the kitchen"
|
||||||
sequence:
|
sequence:
|
||||||
- service: vacuum.send_command
|
- service: vacuum.send_command
|
||||||
data:
|
target:
|
||||||
entity_id: vacuum.xiaomi_vacuum_cleaner
|
entity_id: vacuum.xiaomi_vacuum_cleaner
|
||||||
|
data:
|
||||||
command: app_segment_clean
|
command: app_segment_clean
|
||||||
params: [18]
|
params: [18]
|
||||||
```
|
```
|
||||||
@ -1472,8 +1478,9 @@ reset_main_brush_left:
|
|||||||
alias: "Reset hours for main brush replacement"
|
alias: "Reset hours for main brush replacement"
|
||||||
sequence:
|
sequence:
|
||||||
- service: vacuum.send_Command
|
- service: vacuum.send_Command
|
||||||
data:
|
target:
|
||||||
entity_id: vacuum.xiaomi_vacuum_cleaner
|
entity_id: vacuum.xiaomi_vacuum_cleaner
|
||||||
|
data:
|
||||||
command: reset_consumable
|
command: reset_consumable
|
||||||
params: ['main_brush_work_time']
|
params: ['main_brush_work_time']
|
||||||
```
|
```
|
||||||
@ -1506,8 +1513,9 @@ vacuum_kitchen:
|
|||||||
alias: "vacuum kitchen"
|
alias: "vacuum kitchen"
|
||||||
sequence:
|
sequence:
|
||||||
- service: vacuum.send_command
|
- service: vacuum.send_command
|
||||||
data:
|
target:
|
||||||
entity_id: "vacuum.xiaomi_vacuum_cleaner"
|
entity_id: "vacuum.xiaomi_vacuum_cleaner"
|
||||||
|
data:
|
||||||
command: app_zoned_clean
|
command: app_zoned_clean
|
||||||
params: [[23084,26282,27628,29727,1]]
|
params: [[23084,26282,27628,29727,1]]
|
||||||
```
|
```
|
||||||
|
@ -116,15 +116,17 @@ script:
|
|||||||
alias: "Radio Paradise Porch"
|
alias: "Radio Paradise Porch"
|
||||||
sequence:
|
sequence:
|
||||||
- service: media_player.turn_on
|
- service: media_player.turn_on
|
||||||
data:
|
target:
|
||||||
entity_id: media_player.living_room_stereo_zone_2
|
entity_id: media_player.living_room_stereo_zone_2
|
||||||
- service: media_player.volume_set
|
- service: media_player.volume_set
|
||||||
data:
|
target:
|
||||||
entity_id: media_player.living_room_stereo_zone_2
|
entity_id: media_player.living_room_stereo_zone_2
|
||||||
|
data:
|
||||||
volume_level: 0.48
|
volume_level: 0.48
|
||||||
- service: media_player.play_media
|
- service: media_player.play_media
|
||||||
data:
|
target:
|
||||||
entity_id: media_player.living_room_stereo_zone_2
|
entity_id: media_player.living_room_stereo_zone_2
|
||||||
|
data:
|
||||||
media_content_type: "NET RADIO"
|
media_content_type: "NET RADIO"
|
||||||
media_content_id: "Bookmarks>Internet>Radio Paradise"
|
media_content_id: "Bookmarks>Internet>Radio Paradise"
|
||||||
|
|
||||||
|
@ -88,12 +88,14 @@ automation:
|
|||||||
at: "20:00:00"
|
at: "20:00:00"
|
||||||
action:
|
action:
|
||||||
- service: climate.set_hvac_mode
|
- service: climate.set_hvac_mode
|
||||||
data:
|
target:
|
||||||
entity_id: climate.remotec_zxt120_heating_1_id
|
entity_id: climate.remotec_zxt120_heating_1_id
|
||||||
|
data:
|
||||||
hvac_mode: Heat
|
hvac_mode: Heat
|
||||||
- service: climate.set_temperature
|
- service: climate.set_temperature
|
||||||
data:
|
target:
|
||||||
entity_id: climate.remotec_zxt120_heating_1_39
|
entity_id: climate.remotec_zxt120_heating_1_39
|
||||||
|
data:
|
||||||
temperature: 24
|
temperature: 24
|
||||||
```
|
```
|
||||||
|
|
||||||
@ -107,8 +109,9 @@ automation:
|
|||||||
at: "21:00:00"
|
at: "21:00:00"
|
||||||
action:
|
action:
|
||||||
- service: climate.set_hvac_mode
|
- service: climate.set_hvac_mode
|
||||||
data:
|
target:
|
||||||
entity_id: climate.remotec_zxt120_heating_1_id
|
entity_id: climate.remotec_zxt120_heating_1_id
|
||||||
|
data:
|
||||||
hvac_mode: "Off"
|
hvac_mode: "Off"
|
||||||
```
|
```
|
||||||
|
|
||||||
|
@ -41,7 +41,7 @@ automation:
|
|||||||
{% else %}
|
{% else %}
|
||||||
switch.turn_off
|
switch.turn_off
|
||||||
{% endif %}
|
{% endif %}
|
||||||
data:
|
target:
|
||||||
entity_id: switch.{{ states('input_select.is') }}
|
entity_id: switch.{{ states('input_select.is') }}
|
||||||
```
|
```
|
||||||
|
|
||||||
|
@ -105,7 +105,7 @@ script:
|
|||||||
message: "The washing machine has finished its cycle, please empty it!"
|
message: "The washing machine has finished its cycle, please empty it!"
|
||||||
- alias: "Living Room Lights Blue"
|
- alias: "Living Room Lights Blue"
|
||||||
service: scene.turn_on
|
service: scene.turn_on
|
||||||
data:
|
target:
|
||||||
entity_id: scene.blue
|
entity_id: scene.blue
|
||||||
```
|
```
|
||||||
|
|
||||||
|
@ -110,7 +110,7 @@ intent_script:
|
|||||||
content: I have turned on the lights.
|
content: I have turned on the lights.
|
||||||
action:
|
action:
|
||||||
service: light.turn_on
|
service: light.turn_on
|
||||||
data:
|
target:
|
||||||
entity_id: light.kitchen
|
entity_id: light.kitchen
|
||||||
|
|
||||||
conversation:
|
conversation:
|
||||||
|
@ -361,8 +361,9 @@ automation:
|
|||||||
condition: []
|
condition: []
|
||||||
action:
|
action:
|
||||||
- service: xiaomi_miio.vacuum_clean_zone
|
- service: xiaomi_miio.vacuum_clean_zone
|
||||||
data:
|
target:
|
||||||
entity_id: vacuum.xiaomi_vacuum
|
entity_id: vacuum.xiaomi_vacuum
|
||||||
|
data:
|
||||||
repeats: "{{states('input_number.vacuum_passes')|int}}"
|
repeats: "{{states('input_number.vacuum_passes')|int}}"
|
||||||
zone: [[30914,26007,35514,28807], [20232,22496,26032,26496]]
|
zone: [[30914,26007,35514,28807], [20232,22496,26032,26496]]
|
||||||
```
|
```
|
||||||
|
@ -99,8 +99,9 @@ automation:
|
|||||||
media_content_id: "{{ tags[trigger.event.data.tag_id].media_content_id }}"
|
media_content_id: "{{ tags[trigger.event.data.tag_id].media_content_id }}"
|
||||||
media_content_type: "{{ tags[trigger.event.data.tag_id].media_content_type }}"
|
media_content_type: "{{ tags[trigger.event.data.tag_id].media_content_type }}"
|
||||||
- service: media_player.play_media
|
- service: media_player.play_media
|
||||||
data:
|
target:
|
||||||
entity_id: "{{ media_player_entity_id }}"
|
entity_id: "{{ media_player_entity_id }}"
|
||||||
|
data:
|
||||||
media_content_id: "{{ media_content_id }}"
|
media_content_id: "{{ media_content_id }}"
|
||||||
media_content_type: "{{ media_content_type }}"
|
media_content_type: "{{ media_content_type }}"
|
||||||
- delay: 2 # timeout before we allow processing next scan
|
- delay: 2 # timeout before we allow processing next scan
|
||||||
|
@ -958,8 +958,9 @@ script:
|
|||||||
learn_tv_power:
|
learn_tv_power:
|
||||||
sequence:
|
sequence:
|
||||||
- service: remote.learn_command
|
- service: remote.learn_command
|
||||||
data:
|
target:
|
||||||
entity_id: remote.bedroom
|
entity_id: remote.bedroom
|
||||||
|
data:
|
||||||
device: tv
|
device: tv
|
||||||
command: power
|
command: power
|
||||||
```
|
```
|
||||||
@ -983,8 +984,9 @@ script:
|
|||||||
send_tv_power:
|
send_tv_power:
|
||||||
sequence:
|
sequence:
|
||||||
- service: remote.send_command
|
- service: remote.send_command
|
||||||
data:
|
target:
|
||||||
entity_id: remote.bedroom
|
entity_id: remote.bedroom
|
||||||
|
data:
|
||||||
command: b64:JgAcAB0dHB44HhweGx4cHR06HB0cHhwdHB8bHhwADQUAAAAAAAAAAAAAAAA=
|
command: b64:JgAcAB0dHB44HhweGx4cHR06HB0cHhwdHB8bHhwADQUAAAAAAAAAAAAAAAA=
|
||||||
```
|
```
|
||||||
|
|
||||||
@ -995,8 +997,9 @@ script:
|
|||||||
send_tv_power:
|
send_tv_power:
|
||||||
sequence:
|
sequence:
|
||||||
- service: remote.send_command
|
- service: remote.send_command
|
||||||
data:
|
target:
|
||||||
entity_id: remote.bedroom
|
entity_id: remote.bedroom
|
||||||
|
data:
|
||||||
device: tv
|
device: tv
|
||||||
command: power
|
command: power
|
||||||
```
|
```
|
||||||
|
Loading…
x
Reference in New Issue
Block a user