Hi,
I’m new to HA and been setting up some automations and my latest challenge is to set my alarm using HA.
My idea is to have a dimmable switch that will gradually increase and that part is easy. The hard part is to create a calendar event to start at the desired time.
I’ve created a date and time helper and a button helper to trigger an automation that should create an entry in my calendar. The problem is that I’m not finding a way to pass my datetime helper into the calendar.
Below my YAML for the automation and would appreciate some help on how I can get it to work. End date is fixed for testing purposes, and when I manage to pass the start date and time, I’ll focus on getting 1 second added to my end time (will be another question )
alias: 022-Set Alarm at specific time
description: ""
trigger:
- platform: state
entity_id:
- input_button.set_alarm_button
condition: []
action:
- service: calendar.create_event
data:
summary: Alarm
start_date_time: input_datetime.alarm_date_and_time
end_date_time: "2023-10-19 06:00:01"
target:
entity_id: calendar.automations
mode: single
What am I doing wrong? Been reading the documentation and checking other examples, but not getting it.
Thanks