Automated Alarm Clock: How to create one

This project is using a bunch of different sensors and since it is personalised, there will be no code posted, only the procedure can be described

How annoying could be, forgetting enabling or disabling your alarm clock? You end up waking up too early or at worst, not all…

What if you had an alarm clock that knows when it’s time for you to wake up?
It knows when you have go to work or to an appointment, how long do you need to reach your work place or your planned activity, it knows all the details to wake you up in time…

So let’s create our personalised alarm clock.

Step 1

We need some elements for all the info that our alarm clock needs:

  • Calendars:

    • A work-free calendar where we can enter the dates that are regularly workdays but we don’t have to go to work (vacation, free days, illness, holidays etc). Also there may be some ICS calendars in the web that can be imported, containing the holidays (non workdays) for your region.
    • A must-work calendar in case there is a date planned that we have to go to work in a day that’s not regularly a workday
    • An appointment calendar for all the appointments outside work hours (i.e. have to stay up in Sunday early for the flight…). In the destination field (not implemented yet in ha local calendar) you can enter the address to calculate the Travel time
  • Zones:

    • Home needed for the alarm to know where do you sleep to calculate the time you need to reach the place you have planned to be (work, appointment)
    • Work if you have a standard work place the coordinates will be also used to calculate the time based on traffic
  • Sensors:

    • Input Datetimes:
      • Working hour(s): at what time(s) do you start working
    • Travel Time (Integration example: Waze)
      • Work: The travel time needed to reach work place and
      • Appointment: The coordinates could be retrieved from the “Destination” field from the appointment calendar.
    • Input Numbers:
      • Preparation time: how long do you need from waking up to be outside on the way to your destination. This could be also automated if you make a sensor to calculate the average times of your last waking up procedures.

Step 2

We have all the necessary info now we can build our alarm clock sensor.

The logic:
If it is a workday ( check the must-work calendar first, then check if it isn’t a work-free day ), or there is an appointment planned add the date to the sensor with the time of the starting working hour or appointment time, minus the corresponding travel time, minus the preparation time.
Now you have the datetime for the next alarm clock, you can use it as a trigger for your alarm procedure. You can play a song, you can turn on lights imitating sunrise, you do whatever wakes you up calming to start your day…!

Happy waking up!

2 Likes

Um, where is the config?

All you have shared is an idea.

Exactly, I shared the procedure because the config should vary depending on a person’s needs.
Feel free to delete / move it if it violated any rules (very sorry for that :frowning: )

If you read the category description it says:

Show off the cool projects, automations and configurations you made with Home Assistant!

Have a look at a few other topics in this category. It’s not really a “share your ideas” category.

Your topic is a good start but try giving an example config.

1 Like

Thanks I would give mine but it’s very personalised, wouldn’t help no one and it’s very hard to make a general one.
I wanted eventually to try to make a blueprint but it’s a complicated procedure as I have it in my mind. It also needs to be maintained and I don’t have much time for that.
That’s why I thought I could just post the procedure to inspire others. Unfortunately, I recognise it isn’t very helpful for new people in the world of ha though.