Simplify template defaults in script data
This commit is contained in:
@ -274,7 +274,7 @@ script:
|
|||||||
sequence:
|
sequence:
|
||||||
- service: script.speech_engine
|
- service: script.speech_engine
|
||||||
data:
|
data:
|
||||||
who: "{{ who if who is defined else 'common' }}"
|
who: "{{ who|default('common') }}"
|
||||||
message: !include ../templates/speech/daily_briefing.yaml
|
message: !include ../templates/speech/daily_briefing.yaml
|
||||||
- service: input_boolean.turn_on
|
- service: input_boolean.turn_on
|
||||||
target:
|
target:
|
||||||
@ -285,7 +285,7 @@ script:
|
|||||||
sequence:
|
sequence:
|
||||||
- service: script.speech_engine
|
- service: script.speech_engine
|
||||||
data:
|
data:
|
||||||
who: "{{ who if who is defined else 'common' }}"
|
who: "{{ who|default('common') }}"
|
||||||
message: !include ../templates/speech/nightly_briefing.yaml
|
message: !include ../templates/speech/nightly_briefing.yaml
|
||||||
- service: input_boolean.turn_on
|
- service: input_boolean.turn_on
|
||||||
target:
|
target:
|
||||||
@ -296,7 +296,7 @@ script:
|
|||||||
sequence:
|
sequence:
|
||||||
- service: script.speech_engine
|
- service: script.speech_engine
|
||||||
data:
|
data:
|
||||||
who: "{{ who if who is defined else 'common' }}"
|
who: "{{ who|default('common') }}"
|
||||||
message: !include ../templates/speech/morning_briefing.yaml
|
message: !include ../templates/speech/morning_briefing.yaml
|
||||||
- service: input_boolean.turn_on
|
- service: input_boolean.turn_on
|
||||||
target:
|
target:
|
||||||
@ -307,7 +307,7 @@ script:
|
|||||||
sequence:
|
sequence:
|
||||||
- service: script.status_annc
|
- service: script.status_annc
|
||||||
data:
|
data:
|
||||||
who: "{{ who if who is defined else 'everywhere' }}"
|
who: "{{ who|default('everywhere') }}"
|
||||||
call_dinner_is_ready: 1
|
call_dinner_is_ready: 1
|
||||||
|
|
||||||
we_are_leaving:
|
we_are_leaving:
|
||||||
@ -315,7 +315,7 @@ script:
|
|||||||
sequence:
|
sequence:
|
||||||
- service: script.status_annc
|
- service: script.status_annc
|
||||||
data:
|
data:
|
||||||
who: "{{ who if who is defined else 'everywhere' }}"
|
who: "{{ who|default('everywhere') }}"
|
||||||
call_we_are_leaving: 1
|
call_we_are_leaving: 1
|
||||||
|
|
||||||
server_maintenance_annc:
|
server_maintenance_annc:
|
||||||
@ -323,7 +323,7 @@ script:
|
|||||||
sequence:
|
sequence:
|
||||||
- service: script.status_annc
|
- service: script.status_annc
|
||||||
data:
|
data:
|
||||||
who: "{{ who if who is defined else 'everywhere' }}"
|
who: "{{ who|default('everywhere') }}"
|
||||||
call_interruption: 1
|
call_interruption: 1
|
||||||
call_server_maintenance: 1
|
call_server_maintenance: 1
|
||||||
|
|
||||||
@ -411,7 +411,7 @@ script:
|
|||||||
- alias: "Read the announcement"
|
- alias: "Read the announcement"
|
||||||
service: script.speech_engine
|
service: script.speech_engine
|
||||||
data:
|
data:
|
||||||
who: "{{ who if who is defined else 'everywhere' }}"
|
who: "{{ who|default('everywhere') }}"
|
||||||
message: !include ../templates/speech/birthdays.yaml
|
message: !include ../templates/speech/birthdays.yaml
|
||||||
- alias: "Give time for the announcement to complete"
|
- alias: "Give time for the announcement to complete"
|
||||||
delay:
|
delay:
|
||||||
|
@ -906,12 +906,12 @@ script:
|
|||||||
title: "{{ title }}"
|
title: "{{ title }}"
|
||||||
message: "{{ message }}"
|
message: "{{ message }}"
|
||||||
data:
|
data:
|
||||||
tag: '{{ tag if tag is defined else "{}" }}'
|
tag: '{{ tag|default("{}") }}'
|
||||||
actions: '{{ actions if actions is defined else "{}" }}'
|
actions: '{{ actions|default("{}") }}'
|
||||||
entity_id: '{{ entity if entity is defined else "{}" }}'
|
entity_id: '{{ entity|default("{}") }}'
|
||||||
push:
|
push:
|
||||||
sound:
|
sound:
|
||||||
name: '{{ sound if sound is defined else "default" }}'
|
name: '{{ sound|default("default") }}'
|
||||||
critical: 1
|
critical: 1
|
||||||
- conditions:
|
- conditions:
|
||||||
- condition: template
|
- condition: template
|
||||||
@ -935,12 +935,12 @@ script:
|
|||||||
title: '{{ title }}'
|
title: '{{ title }}'
|
||||||
message: '{{ message }}'
|
message: '{{ message }}'
|
||||||
data:
|
data:
|
||||||
tag: '{{ tag if tag is defined else "{}" }}'
|
tag: '{{ tag|default("{}") }}'
|
||||||
actions: '{{ actions if actions is defined else "{}" }}'
|
actions: '{{ actions|default("{}") }}'
|
||||||
entity_id: '{{ entity if entity is defined else "{}" }}'
|
entity_id: '{{ entity|default("{}") }}'
|
||||||
push:
|
push:
|
||||||
sound:
|
sound:
|
||||||
name: '{{ sound if sound is defined else "default" }}'
|
name: '{{ sound|default("default") }}'
|
||||||
default:
|
default:
|
||||||
- condition: state
|
- condition: state
|
||||||
entity_id: input_boolean.text_notifications
|
entity_id: input_boolean.text_notifications
|
||||||
@ -992,12 +992,12 @@ script:
|
|||||||
title: '{{ title }}'
|
title: '{{ title }}'
|
||||||
message: '{{ message }}'
|
message: '{{ message }}'
|
||||||
data:
|
data:
|
||||||
tag: '{{ tag if tag is defined else "{}" }}'
|
tag: '{{ tag|default("{}") }}'
|
||||||
actions: '{{ actions if actions is defined else "{}" }}'
|
actions: '{{ actions|default("{}") }}'
|
||||||
entity_id: '{{ entity if entity is defined else "{}" }}'
|
entity_id: '{{ entity|default("{}") }}'
|
||||||
push:
|
push:
|
||||||
sound:
|
sound:
|
||||||
name: '{{ sound if sound is defined else "default" }}'
|
name: '{{ sound|default("default") }}'
|
||||||
|
|
||||||
tv_notify:
|
tv_notify:
|
||||||
alias: 'TV Notify'
|
alias: 'TV Notify'
|
||||||
@ -1053,7 +1053,7 @@ script:
|
|||||||
data:
|
data:
|
||||||
title: '{{ title }}'
|
title: '{{ title }}'
|
||||||
message: '{{ message }}'
|
message: '{{ message }}'
|
||||||
data: '{{ data if data is defined else "{}" }}'
|
data: '{{ data|default("{}") }}'
|
||||||
|
|
||||||
text_alert_image:
|
text_alert_image:
|
||||||
alias: 'Text Alert Image'
|
alias: 'Text Alert Image'
|
||||||
|
Reference in New Issue
Block a user