From ac2b3e09421e61e8776711d29cd4b62cf4434d38 Mon Sep 17 00:00:00 2001 From: Tony Stork Date: Thu, 29 Sep 2022 18:51:30 -0400 Subject: [PATCH] Rewrote tv_notify to be consistent with text_notify #42 --- packages/notify.yaml | 54 +++++++++++++++++++++++--------------------- 1 file changed, 28 insertions(+), 26 deletions(-) diff --git a/packages/notify.yaml b/packages/notify.yaml index f10b1cc..5b2a7d5 100644 --- a/packages/notify.yaml +++ b/packages/notify.yaml @@ -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 }}'