Recently, I embarked on a journey to automate my smart home using Home Assistant, and I’m thrilled to share my experience with you! ![]()
The Goal: I wanted to create an automation that would start my robot vacuum cleaner if it hadn’t run in over four days. Sounds simple, but it involved a bit of problem-solving!
The Challenge: Initially, I was using Node-Red for automations, but I wanted to explore Home Assistant’s native automation features. The main hurdle was figuring out how to track the last run time of the vacuum and trigger it after four days. I considered using a helper entity to store the last run time but wasn’t sure how to implement it smoothly.
The Solution: After some research and trial and error, I discovered that using a template trigger alongside a helper entity was the way to go. Here’s a quick breakdown of what I did:
- Tracking Last Run: I set up an automation to update a helper entity every time the vacuum starts. This entity stores the timestamp of the last run.
- Trigger Condition: I created a template trigger that checks if the time since the last run exceeds four days. If it does, the vacuum starts automatically.
- Testing: I tested the setup thoroughly to ensure it works without any hiccups. It’s been running smoothly for weeks now!
The Outcome: This automation has been a game-changer for me. It ensures my vacuum runs regularly without me having to remember to schedule it manually. Plus, it’s given me confidence to explore more complex automations in the future!
Tips for Others:
- Start simple and gradually build up your automations.
- Don’t hesitate to consult the community or documentation if you hit a snag.
- Celebrate small victories—each automation you set up is a step towards a smarter home!
I’d love to hear about your automation projects or any tips you’ve picked up along the way. Let’s keep the conversation going! ![]()
![]()