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"}}'
sequence: then:
- service: notify.living_room_tv - service: notify.living_room_tv
data: data:
title: '{{ title }}' title: '{{ title }}'
message: '{{ message }}' message: '{{ message }}'
- conditions: - if:
- condition: template - condition: template
value_template: '{{ who == "master_bedroom"}}' value_template: '{{ who == "master_bedroom"}}'
sequence: then:
- service: notify.master_bedroom_tv - service: notify.master_bedroom_tv
data: data:
title: '{{ title }}' title: '{{ title }}'
message: '{{ message }}' message: '{{ message }}'
- conditions: - if:
- condition: template - condition: template
value_template: '{{ who == "basement"}}' value_template: '{{ who == "basement"}}'
sequence: then:
- service: notify.basement_tv - service: notify.basement_tv
data: data:
title: '{{ title }}' title: '{{ title }}'
message: '{{ message }}' message: '{{ message }}'
default: - if:
- condition: template
value_template: '{{ who == "all"}}'
then:
- service: notify.tv_notifications - service: notify.tv_notifications
data: data:
title: '{{ title }}' title: '{{ title }}'