Hi All,
One of the things I have wanted to do for a long time is open HASS companion app on my iPhone and get the relevant dashboard for the room I am in. I.e. if I am in the Kitchen show me a dashboard with the TV, lights and Sonos for that room.
I set up presence detection using ESPresense. By using ESP32s I can track which room my iPhone is in using the mqtt_room entity. There are plenty of guides on how to set that up so won’t detail that here.
I was trying to find a way to automatically choose a dashboard. I looked at BrowserMod and Tab Redirect Card but they didn’t do what I needed.
Instead I used the Shortcuts app in iOS and created a shortcut which pulls the location from a sensor, builds a URL and launches the HASS companion app. I thought it might be too slow but it works really well. Configuration is below:
You can then add that as an icon on the home screen.
It was actually quite simple in the end but I didn’t think to use Shortcuts and in all my searching I never found this solution so thought I would share.
David