I have looked around and can not find anything that fully works for my issue: I want to be able to set the home page template on the fly when a user is visiting from a mobile phone but not a tablet. I already have this check in place.
However I am able to change the whole theme on all pages when a visitor is on a phone but there does not seem to be a way to only change the template/theme on the home page.
Due to the only way I know for sure is checking is_front_page()
which does not exist when you hook to change the theme. I also want to try to do this without redirecting to another page if possible.
Or you can use another way, may be bit long but will give you full control how you want to drive your site/template.
Make responsive CSS.
Call desktop styles in tablet view/resolution with media queries and for the smaller device, set styles as you want.
This will give you control in a way that you can have totally different layout in portrait and landscape view of a single device.
You could use
template_include
withwp_is_mobile
Then you could use another conditional tag to exclude tablets.
You could check for a mobile device using wp_is_mobile() and then include the right template part with get_template_part().
Header and footer can be styled quickly with a couple of css media queries.
https://en-au.wordpress.org/plugins/mobble/