You can not select more than 25 topics
Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
44 lines
1.3 KiB
44 lines
1.3 KiB
######################################################################
|
|
# @CCOSTAN - Follow Me on X
|
|
# For more info visit https://www.vcloudinfo.com/click-here
|
|
# Original Repo : https://github.com/CCOSTAN/Home-AssistantConfig
|
|
# -------------------------------------------------------------------
|
|
# LOG Medicine - Home Assistant automation behavior.
|
|
# Defines the LOG Medicine triggers, conditions, and actions.
|
|
# -------------------------------------------------------------------
|
|
######################################################################
|
|
- alias: 'Log Medicine Activity'
|
|
mode: single
|
|
id: 5e250206-029e-42fb-993f-fc3f04760de3
|
|
|
|
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:
|
|
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'
|
|
- delay:
|
|
minutes: 1
|