Home-AssistantConfig/config/automation/medicine_logger.yaml

38 lines
916 B
YAML
Raw Normal View History

2018-01-02 00:00:45 +00:00
###################################
## LOG Medicine
###################################
- alias: 'Log Medicine Activity'
mode: single
2020-07-20 18:33:03 +00:00
id: 5e250206-029e-42fb-993f-fc3f04760de3
2018-01-02 00:00:45 +00:00
trigger:
- platform: event
event_type: medicine_dash
- platform: state
entity_id: input_boolean.medicine
to: 'on'
from: 'off'
action:
- service: input_boolean.turn_on
entity_id: input_boolean.medicine
- service: logbook.log
data:
name: "Medicine Push"
message: "Took Medicine today."
- service: mqtt.publish
data:
2018-01-02 00:00:45 +00:00
payload: '{{ states("sensor.date") }}'
topic: 'dash/medicine/medicine_time'
retain: true
- service: script.notify_engine
data:
title: 'Medicine Reminder Completed'
value1: 'Carlo Took his Medicine today.'
who: 'parents'
group: 'Medicine'
2018-01-02 00:00:45 +00:00
- delay:
minutes: 1