2017-03-12 05:24:56 +00:00
|
|
|
###################################
|
2017-04-09 22:32:12 +00:00
|
|
|
## LOG Medicine
|
2017-03-12 05:24:56 +00:00
|
|
|
###################################
|
2017-03-12 06:22:30 +00:00
|
|
|
- alias: 'Log Medicine Activity'
|
2017-03-12 05:24:56 +00:00
|
|
|
hide_entity: True
|
|
|
|
trigger:
|
|
|
|
- platform: event
|
|
|
|
event_type: simplehuman_dash
|
|
|
|
|
|
|
|
action:
|
|
|
|
|
|
|
|
- service: input_boolean.turn_on
|
|
|
|
entity_id: input_boolean.medicine
|
2017-04-09 22:32:12 +00:00
|
|
|
- service: automation.turn_off
|
|
|
|
entity_id: automation.log_medicine_activity
|
2017-03-12 05:24:56 +00:00
|
|
|
- service: logbook.log
|
|
|
|
data:
|
|
|
|
name: "Medicine Push"
|
|
|
|
message: "Took Medicine today."
|
|
|
|
|
|
|
|
- service: mqtt.publish
|
|
|
|
data_template:
|
|
|
|
payload: '{{ states("sensor.date") }}'
|
|
|
|
topic: 'dash/simplehuman/medicine_time'
|
|
|
|
retain: true
|
2017-03-13 17:33:32 +00:00
|
|
|
|
|
|
|
- service: script.ifttt_notify
|
|
|
|
data_template:
|
|
|
|
value1: 'Took Medicine today.'
|
2017-04-09 22:32:12 +00:00
|
|
|
|
|
|
|
- delay:
|
|
|
|
minutes: 1
|
|
|
|
- service: automation.turn_on
|