I wanted to share my experience setting up a ‘Goodnight’ automation routine in my smart home. It’s been a game-changer for me, especially since I’m part of an on-call rotation for work. Here’s how I did it:
The Problem:
I often forget to disable my phone’s silence mode, which has led to missed calls during my on-call shifts. I wanted a way to automate the setup so I wouldn’t have to think about it every night.
The Solution:
I decided to use Home Assistant (HA) combined with Tasker on my Android phone. Here’s a breakdown of the steps:
-
Calendar Integration:
- I created an all-day calendar event in Google Calendar titled “ONCALL”. This event runs from Friday 8 am until the following Friday at 8 am. I’ve scheduled all my on-call events for the year in this calendar.
-
HA Sensor Setup:
- I set up a sensor in HA to detect the “ONCALL” event in my Google Calendar. This sensor turns ON when the event is active.
-
Automation Flow:
- Every night, I run a ‘Goodnight’ script which turns off all the lights and switches. As part of this script, it also turns ON an input_boolean called “oncall_mode” for 1 minute.
-
Push Notification:
- When the input_boolean turns ON, HA sends a PushBullet notification to my phone with the message: “Keith, you are on call tonight. Setup call forward”.
-
Tasker Automation:
- Tasker on my phone monitors for this specific PushBullet notification. When it receives the message, it automatically dials the Verizon call forward number to direct calls to my landline.
-
Morning Routine:
- To ensure call forwarding is turned off in the morning, HA sends another PushBullet notification at 8 am on days I’m on call. Tasker then dials the number to disable call forwarding.
Why This Works:
- Hands-off Operation: Once set up, this routine runs automatically without needing manual intervention.
- Integration: Combining HA with Tasker allows for powerful automation that wouldn’t be possible with either system alone.
- Customization: The use of Google Calendar makes it easy to manage my on-call schedule throughout the year.
Tips for Others:
- Start Small: Begin with a simple automation and gradually add complexity as you become more comfortable.
- Test Thoroughly: Make sure each part of your automation works as expected before relying on it.
- Backup Plan: Have a manual override in case something goes wrong.
I hope this helps someone looking to streamline their smart home setup! Let me know if you have any questions or suggestions for improvement. ![]()