From 599265ccf13250a8d98df0f589b24bfac23a3980 Mon Sep 17 00:00:00 2001 From: Tony Stork Date: Sun, 4 Aug 2024 14:42:58 -0400 Subject: [PATCH] Change template condition to "or" condition for my meds cleanup #205 --- automations.yaml | 21 +++++++++++++++------ 1 file changed, 15 insertions(+), 6 deletions(-) diff --git a/automations.yaml b/automations.yaml index efb3636..e4ef04a 100644 --- a/automations.yaml +++ b/automations.yaml @@ -5630,12 +5630,21 @@ sequence: - alias: Send critical TTS notification if any meds aren't taken if: - - condition: template - value_template: "{% set med_reminders = is_state('input_boolean.tony_morning_meds_reminder','on') - or\n is_state('input_boolean.tony_afternoon_meds_reminder','on') - or\n is_state('input_boolean.tony_night_meds_reminder','on') - %}\n{{ med_reminders == true }}" - alias: If any med reminders are currently active + - alias: Check if any reminders are active + condition: or + conditions: + - condition: state + entity_id: input_boolean.tony_morning_meds_reminder + state: 'on' + alias: Morning meds reminder active + - condition: state + entity_id: input_boolean.tony_afternoon_meds_reminder + state: 'on' + alias: Afternoon meds reminder active + - condition: state + entity_id: input_boolean.tony_night_meds_reminder + state: 'on' + alias: Night meds reminder active then: - alias: Send critical TTS notification service: script.text_notify