Rewrote tv_notify to be consistent with text_notify #42

This commit is contained in:
2022-09-29 18:51:30 -04:00
parent 436e5bc246
commit ac2b3e0942

View File

@ -344,32 +344,34 @@ script:
tv_notify: tv_notify:
sequence: sequence:
- choose: - if:
- conditions: - condition: template
- condition: template value_template: '{{ who == "living_room"}}'
value_template: '{{ who == "living_room"}}' then:
sequence: - service: notify.living_room_tv
- service: notify.living_room_tv data:
data: title: '{{ title }}'
title: '{{ title }}' message: '{{ message }}'
message: '{{ message }}' - if:
- conditions: - condition: template
- condition: template value_template: '{{ who == "master_bedroom"}}'
value_template: '{{ who == "master_bedroom"}}' then:
sequence: - service: notify.master_bedroom_tv
- service: notify.master_bedroom_tv data:
data: title: '{{ title }}'
title: '{{ title }}' message: '{{ message }}'
message: '{{ message }}' - if:
- conditions: - condition: template
- condition: template value_template: '{{ who == "basement"}}'
value_template: '{{ who == "basement"}}' then:
sequence: - service: notify.basement_tv
- service: notify.basement_tv data:
data: title: '{{ title }}'
title: '{{ title }}' message: '{{ message }}'
message: '{{ message }}' - if:
default: - condition: template
value_template: '{{ who == "all"}}'
then:
- service: notify.tv_notifications - service: notify.tv_notifications
data: data:
title: '{{ title }}' title: '{{ title }}'