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