home-assistant-configuration/config/packages/reminders.yaml

56 lines
1.5 KiB
YAML
Executable File

###############################################################################
# @author : Jeffrey Stone
# @date : 07/15/2019
# @package : Reminders
# @description : Autoamtions to set reminders
###############################################################################
input_datetime:
kat_pill_reminder:
name: Kat Pill Reminder
has_date: false
has_time: true
heartworm_reminder:
name: Heartworm Reminder
has_date: true
has_time: false
input_boolean:
washer_finished:
name: Washer Finished
icon: mdi:washing-machine
automation:
# Massive automation to call all the reminder scripts.
- id: turn_reminders_on
alias: Turn Reminders On
initial_state: true
trigger:
- entity_id: calendar.reminders
from: 'off'
platform: state
to: 'on'
action:
- service: script.heartworm_on
- id: '1562630916597'
alias: Kat Pill Reminder
initial_state: true
trigger:
- platform: template
value_template: "{{ states('sensor.time') == (state_attr('input_datetime.kat_pill_reminder', 'timestamp') | int | timestamp_custom('%H:%M', False)) }}"
action:
- data:
message: Remember to take meds
service: notify.kat_ios
script:
# Check to see if heartworm is the reminder in the cal
heartworm_on:
sequence:
- condition: template
value_template: '{{ states.calendar.reminders.attributes.message == "Heartworm" }}'
- service: input_boolean.turn_on
entity_id: input_boolean.heartworm