From 17da9c4ef99d52ae9afdae50fabfe6ec6470877b Mon Sep 17 00:00:00 2001 From: Tony Stork Date: Tue, 30 Jul 2024 20:04:27 -0400 Subject: [PATCH] We need to START the med scripts by incrementing the counter Doing it at the end means things that should happen on the third reminder will not actually happen until the fourth. #205 --- scripts.yaml | 36 ++++++++++++++++++------------------ 1 file changed, 18 insertions(+), 18 deletions(-) diff --git a/scripts.yaml b/scripts.yaml index 87dc221..eeb39c7 100644 --- a/scripts.yaml +++ b/scripts.yaml @@ -1647,6 +1647,12 @@ tony_morning_meds: icon: mdi:medication mode: restart sequence: + - service: counter.increment + metadata: {} + data: {} + target: + entity_id: counter.tony_morning_meds_reminder_count + alias: Increment morning reminder counter - service: script.text_notify data: type: alert @@ -1688,17 +1694,17 @@ tony_morning_meds: message: Tony, you need to take your morning meds. This is reminder number {{ states('counter.tony_morning_meds_reminder_count') }} for today. alias: Send TTS notification - - service: counter.increment - metadata: {} - data: {} - target: - entity_id: counter.tony_morning_meds_reminder_count - alias: Increment morning reminder counter tony_night_meds: alias: Tony Night Meds icon: mdi:medication mode: restart sequence: + - service: counter.increment + metadata: {} + data: {} + target: + entity_id: counter.tony_night_meds_reminder_count + alias: Increment night reminder counter - service: script.text_notify data: type: alert @@ -1740,12 +1746,6 @@ tony_night_meds: message: Tony, you need to take your night meds. This is reminder number {{ states('counter.tony_night_meds_reminder_count') }} for today. alias: Send TTS notification - - service: counter.increment - metadata: {} - data: {} - target: - entity_id: counter.tony_night_meds_reminder_count - alias: Increment night reminder counter tony_stream_today: alias: Tony Stream Today sequence: @@ -1897,6 +1897,12 @@ tony_afternoon_meds: icon: mdi:medication mode: restart sequence: + - service: counter.increment + metadata: {} + data: {} + target: + entity_id: counter.tony_afternoon_meds_reminder_count + alias: Increment afternoon reminder counter - service: script.text_notify data: type: alert @@ -1938,12 +1944,6 @@ tony_afternoon_meds: message: Tony, you need to take your afternoon meds. This is reminder number {{ states('counter.tony_afternoon_meds_reminder_count') }} for today. alias: Send TTS notification - - service: counter.increment - metadata: {} - data: {} - target: - entity_id: counter.tony_afternoon_meds_reminder_count - alias: Increment afternoon reminder counter tony_ibuprofen: alias: Tony Ibuprofen sequence: