From 4e13836c94432c6b48a4ba2a285ae3a46c23b473 Mon Sep 17 00:00:00 2001 From: ccostan Date: Sun, 17 Mar 2019 21:43:55 -0400 Subject: [PATCH] Updated IOS actions to use the notification script engine as well : Code from #357 --- config/automation/medicine_logger.yaml | 7 +++--- config/packages/ios.yaml | 32 +++++++++++++------------- config/scene/monthly_colors.yaml | 2 +- 3 files changed, 21 insertions(+), 20 deletions(-) diff --git a/config/automation/medicine_logger.yaml b/config/automation/medicine_logger.yaml index 1b4c97da..d294ebb2 100755 --- a/config/automation/medicine_logger.yaml +++ b/config/automation/medicine_logger.yaml @@ -29,9 +29,10 @@ - service: script.notify_engine data_template: - value1: 'Took Medicine today.' - who: "parents" + title: 'Medicine Reminder Completed' + value1: 'Carlo Took Medicine today.' + who: 'parents' - delay: minutes: 1 - service: automation.turn_on - entity_id: automation.log_medicine_activity \ No newline at end of file + entity_id: automation.log_medicine_activity diff --git a/config/packages/ios.yaml b/config/packages/ios.yaml index c1fd6f76..457805c5 100755 --- a/config/packages/ios.yaml +++ b/config/packages/ios.yaml @@ -63,9 +63,6 @@ automation: event_data: actionName: TABLET_TAKEN action: - - service: notify.ios_carloxsmax - data: - message: "Great job!" - service: input_boolean.turn_on entity_id: input_boolean.medicine @@ -76,11 +73,18 @@ automation: event_data: actionName: NOT_HOME action: - - service: notify.ios_carloxsmax - data: - message: "Ok. I will remind you when you get home." + - service: script.notify_engine + data_template: + title: 'Medicine Reminder' + value1: 'Ok. I will remind you when you get home.' + who: 'carlo' - wait_template: >- {{ states.device_tracker.carlo.state == 'home' }} + - service: script.notify_engine + data_template: + title: 'Medicine Reminder' + value1: 'Ok. I will remind you when you get home.' + who: 'carlo' - service: notify.ios_carloxsmax data: message: "Now that your home, please take your medicine!" @@ -107,15 +111,11 @@ automation: state: 'off' action: - - service: notify.ios_carloxsmax - data: - title: "Medicine Alert!" - message: "Please take your Medicine!" - data: - push: - category: "tablet" - action_data: - entity_id: light.test - my_custom_data: foo_bar + - service: script.notify_engine + data_template: + title: 'Medicine Alert!' + value1: 'Please take your Medicine!' + ios_category: "tablet" + who: "carlo" ## Reminders to take my Medicine! - End. diff --git a/config/scene/monthly_colors.yaml b/config/scene/monthly_colors.yaml index 6ad45fa8..0df6cc06 100755 --- a/config/scene/monthly_colors.yaml +++ b/config/scene/monthly_colors.yaml @@ -103,7 +103,7 @@ group.outdoor_front_lights: state: 'on' #color_name: 'Dark Spring Green' - rgb_color: [23,114,69] + color_name: 'Green' - name: month_pi_colors entities: