Is there a way to automatically turn off the wireless hotspot once I get back home?
Other than MacroDroid which is already covered by 3DDario here, you can consider any of the following apps -- none requires root for the goal.

Tasker (paid; 7 day free trial).


Profile: Any of the following would do:


Location: choose the location
State &rarr; Net &rarr; WiFi Near &rarr; fill the details -- I'm unsure whether it would work if the hotspot is enabled.

Task &rarr; (Action) &rarr; Net &rarr; WiFi Tether &rarr; Off

Since the final goal is to connect to Wi-Fi at home, another action can be Net &rarr; WiFi &rarr; Set &rarr; On.




Droid Automation (free/paid) may also work here.


Trigger: Location area (Geofencing - Beta) &rarr;  fill the details
Task: Networks &rarr; Wi-Fi &rarr; Enable


The dry run worked for me. 



Condi (free) also worked in my test case.


Action: 


Connectivity and Sensors &rarr; WiFi Tethering &rarr;  Off
Connectivity and Sensors &rarr; WiFi  &rarr;  On

Condition: Location &rarr; select location


Done!