Updated IOS actions to use the notification script engine as well : Code from #357

This commit is contained in:
ccostan 2019-03-17 21:43:55 -04:00
parent 33c9fb52f9
commit 4e13836c94
3 changed files with 21 additions and 20 deletions

View File

@ -29,9 +29,10 @@
- service: script.notify_engine - service: script.notify_engine
data_template: data_template:
value1: 'Took Medicine today.' title: 'Medicine Reminder Completed'
who: "parents" value1: 'Carlo Took Medicine today.'
who: 'parents'
- delay: - delay:
minutes: 1 minutes: 1
- service: automation.turn_on - service: automation.turn_on
entity_id: automation.log_medicine_activity entity_id: automation.log_medicine_activity

View File

@ -63,9 +63,6 @@ automation:
event_data: event_data:
actionName: TABLET_TAKEN actionName: TABLET_TAKEN
action: action:
- service: notify.ios_carloxsmax
data:
message: "Great job!"
- service: input_boolean.turn_on - service: input_boolean.turn_on
entity_id: input_boolean.medicine entity_id: input_boolean.medicine
@ -76,11 +73,18 @@ automation:
event_data: event_data:
actionName: NOT_HOME actionName: NOT_HOME
action: action:
- service: notify.ios_carloxsmax - service: script.notify_engine
data: data_template:
message: "Ok. I will remind you when you get home." title: 'Medicine Reminder'
value1: 'Ok. I will remind you when you get home.'
who: 'carlo'
- wait_template: >- - wait_template: >-
{{ states.device_tracker.carlo.state == 'home' }} {{ 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 - service: notify.ios_carloxsmax
data: data:
message: "Now that your home, please take your medicine!" message: "Now that your home, please take your medicine!"
@ -107,15 +111,11 @@ automation:
state: 'off' state: 'off'
action: action:
- service: notify.ios_carloxsmax - service: script.notify_engine
data: data_template:
title: "Medicine Alert!" title: 'Medicine Alert!'
message: "Please take your Medicine!" value1: 'Please take your Medicine!'
data: ios_category: "tablet"
push: who: "carlo"
category: "tablet"
action_data:
entity_id: light.test
my_custom_data: foo_bar
## Reminders to take my Medicine! - End. ## Reminders to take my Medicine! - End.

View File

@ -103,7 +103,7 @@
group.outdoor_front_lights: group.outdoor_front_lights:
state: 'on' state: 'on'
#color_name: 'Dark Spring Green' #color_name: 'Dark Spring Green'
rgb_color: [23,114,69] color_name: 'Green'
- name: month_pi_colors - name: month_pi_colors
entities: entities: