Had the same situation, finally figured it out.
Some background - I have an AppleTV HD 4th generation (not the 4k) which is set up as a hub in one location. Then at a completely different location with a different WiFi, I have a HomePod mini set up as a hub.
The first thing you have to realize is that "Home" in the HomeKit app literally means a home. Not a room in a home, but I'm talking in terms of, "I have a home in Los Angeles, and I have another home in New York". So when you are setting this thing up, if you are dealing with two different locations with two different WiFi, make a separate "Home" for each.
The problem - I could turn on or off a device using the HomeKit app, but the automations absolutely would not work.
To resolve the problem, I first made two "Homes", and then set up each device at the appropriate location using it's Wifi connection.
Next, and this is a key point - When you go to test these devices turn OFF the WiFi on your iPhone and use your carrier signal to connect to the internet. You are supposed to be able to control this from anywhere in the world. This thing operates differently when you are directly connected to the WiFi network than if you are off the network (away).
Once you do that, navigate to the HomeKit app, then check each "home" (or if you only have one, check that) and see if the devices are showing their status. Does it say "Off" or "On", or does it say, "No Response". If it says "No Response" then that hub is having issues. In my case, the location that had the HomePod mini were showing it's devices status correctly but the location with the AppleTV acting as a hub was getting "no response". By doing that, I was able to narrow down the issue to AppleTV.
On my AppleTV, I have it set to "Auto Update" the software. Except that it didn't. I did a manual AppleTV software update that was huge, it took 30 minutes to complete. Once I updated the AppleTV, everything started working properly. I think most of these issues are related to iPhone/iPad/AppleTV/HomePod being on different software versions. You update your iPhone but forget to update your AppleTV or HomePod, etc.
Again, on your iPhone make sure your wifi is off and you're using your phone company carrier signal to test your hubs with the HomeKit app. Once you can connect from outside of your home, your automations should all work.