Yep, I use this method for my garage doors and door locks as well for when I leave and arrive.
However, it’s not practical in my situation. When I’m in my bedroom and I need to unlock my closet door, it would be nice to have Siri unlock the door when I ask on the HomePod. Suppose I can just leave it unlocked when I’m home and lock when I leave. It’s for the kids’ nanny and cleaning lady. They don’t need to be in my closet.
Maybe with the upcoming Siri voice recognition/multi user support.