Replace service_templates

This commit is contained in:
2021-05-17 00:22:49 +03:00
parent 6a4593b7b4
commit 8ad3116044
5 changed files with 7 additions and 7 deletions
@@ -45,7 +45,7 @@ input_number:
script:
toshiba_ac_toggle_cool:
sequence:
- service_template: >-
- service: >-
{% if is_state('climate.toshiba_ac', 'off') %}
script.toshiba_ac_on_cool
{% else %}
@@ -65,7 +65,7 @@ automation:
value_template: >
{{ trigger.payload_json.action == "on" }}
action:
- service_template: light.turn_on
- service: light.turn_on
data_template:
entity_id: >-
{% set groupId = (trigger.payload_json.action_group % 10) %}
@@ -76,11 +76,11 @@
# action:
# - delay: 00:00:03
# - service_template: "input_boolean.turn_{{ states('light.kitchen_main') }}"
# - service: "input_boolean.turn_{{ states('light.kitchen_main') }}"
# entity_id: input_boolean.tuya_kitchen_main_lights_state
# - service_template: "input_boolean.turn_{{ states('light.kitchen_secondary') }}"
# - service: "input_boolean.turn_{{ states('light.kitchen_secondary') }}"
# entity_id: input_boolean.tuya_kitchen_secondary_lights_state
# - service_template: "input_boolean.turn_{{ states('light.hallway_main') }}"
# - service: "input_boolean.turn_{{ states('light.hallway_main') }}"
# entity_id: input_boolean.tuya_hallway_main_lights_state
+1 -1
View File
@@ -52,7 +52,7 @@ script:
alias: Speech · Say discretely
sequence:
# Figure out whether to talk or send a text.
- service_template: >
- service: >
{% if (is_state('media_player.master_bedroom', 'playing')
and is_state('binary_sensor.sonos_recoverable', 'off'))
or is_state('input_boolean.speech_notifications', 'off')
+1 -1
View File
@@ -93,6 +93,6 @@ automation:
event_data:
action: "call-service"
action:
- service_template: "{{ trigger.event.data.service }}"
- service: "{{ trigger.event.data.service }}"
data_template:
entity_id: "{{ trigger.event.data.entity_id }}"