Not to sound cheesy, but sometimes you just need to ask yourself "what if... xyz triggers when I arrive?". Believe me, what if can really change your life.
I never thought about automation as something I could use in my day to day routine. But I started thinking: What if I could open the garage door directly from my car screen? Check. Or what if... when I was arriving home, I'll get a pop-up on my phone asking me which building entrance I was walking through and then opened every gate in sequence for me? Also check.
I automate software for a living. But I never though of it as something tangible.
As a Lead QA Engineer, my job is to stare at manual workflows across SaaS platforms and mobile apps and turn them into something that runs by itself. It's a strange thing to do that for a living and never once cross the threshold into automating something physical. Something with a door and a motor and a delay. And then you do it once, and it feels incredible.
Enter Home Assistant. All I wanted was to open the garage from my car screen. Now I'm sitting on 99 automations, and this series is the tour:
- Getting home — gates, the alarm and the car (this one)
- Inside the house — floor heating and cooling, air and appliances
- The boring ones — the automations that actually protect the place
The gates: reverse engineering Alfred Smart
Every gate in my building runs on Alfred Smart, an access-control platform with its own app and no Home Assistant integration. So I looked at what the Alfred web app sends. It turned out to be a plain REST API: a login that returns a JWT, and one PATCH /devices/interact per door, with a gateway ID and a device ID.
I rebuilt both as rest_commands in Home Assistant, sending the same headers the web app does. Also, since the the access token is valid for 60 days, I automated a renovation for the credentials every month or so.
Testing it is where it got interesting. Every gate goes through one script that reads the HTTP status. And how to get exact times of entrance? Doing them, over and over. I mean, I am going to be entering my household many times - why not take note and adjust the times until you get them right.
Then came the health check. A badge at the top of the dashboard polls the API, keeping the last real value for 15 minutes before admitting the service is down. That avoids me using the automations and not knowing that they're offline (happened more than twice).
Walking in: a state machine tuned with a stopwatch
There are five gates in the complex, and arriving on foot through Gate 11 is not the same path as through Gate 5. So each entrance became a sequence: open this, wait, open that. The waits — G11 → G3 in 30 s, G5 → G3 in 50 s — come from what I said before, just entering again and again until the timing is perfect. Not that it needed much adjustments, most cases was 3-5s window.
Those numbers used to be hardcoded, and they rotted: one button said 35 s, another said 32 s, and the script actually waited 30. Now each wait is one helper, editable from an "Adjust timings" pop-up, and both the delay and the button label read from it.
The phone asks before I get there
When I'm about 200 m from home, my phone asks "Arriving home — which way are you coming in?", with one button per gate. One tap and the sequence runs while I walk. If Android Auto is connected it stays quiet: in the car, I'm not walking in.
I can change my home zone radius and adapt the YML file to when it's triggered in the street. 150m or 100m, that's the secret. Also, it disarms my alarm based on when I get closer to my door, after another smaller radius that is set to my door as well.
The alarm: Verisure through the Securitas integration
The alarm is a Verisure, connected through the Securitas custom integration from HACS. The protocol has a "partial night" mode, so Home Assistant drew three buttons: Disarmed, Partial, Full - just like the phyisical device. It also talks to the Ring cameras, detecting movement and lets me know if there's movement with the alarm on.
Now the PIN entering is gone: the alarm disarms when we get home. Me and my partner are not detected home after closing the door, but no alarm was set? It is automatically set. I enable with one tap arming or disarming by day or at night and the time slot as well. Be gone poorly designed Verisure app.
The car: the Toyota integration, and a lock it didn't have
The Toyota integration from HACS gives me fuel, odometer, doors and windows, but no lock. The library underneath can send remote commands, so I wrote a lock.py for it. That made the car automations possible: unlocked for 3 minutes → a notification, still unlocked at 6 → lock it. The notification carries an "I'm using it (30 min)" button, because the first version locked the car on me while I was filling the air pressure of the tires.
I can also lock and unlock my car way easily now. It is a feature that I hope it gets merged eventually which I coded into the HACS integration. And I also have panel buttons to when I'm "Arriving" and "Going out", opening two garage doors each in sequence, with a timed wait also between them.
Next: inside the house — where the wall thermostats and Home Assistant have been at war for months, and a CO₂ chart ended up telling me to change a filter.
Running Home Assistant Green, YAML-first, with a dashboard built on Bubble Card and Mushroom. Happy to go deeper on any of these in the comments.





![[Car tab — the top part]](https://media2.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fdev-to-uploads.s3.us-east-2.amazonaws.com%2Fuploads%2Farticles%2F1vzwztnx1f5rr98ow60z.png)

Top comments (0)