right from the top of my head. If you have the gpstracker binding and just a door opening sensor on your entrance door(s) you could say something along the lines
If (presence was off) and if (I am at home range) and if (the main door opens) then (switch on the tv)
When “WorkPresence” goes from ON to OFF, set a dummy Item “LeftWork” to ON. The next time your “HomePresence” goes to ON, if LeftWork is also ON, then turn on the TV, and set LeftWork to OFF (so it doesn’t re-activate again until you’ve been to work again).
Bonus points for also using Expire or a Timer which could set LeftWork to OFF after a set period, or a Cron triggered Rule in case you decide to go elsewhere first and get back home late, in which case you might not want the TV turning on automatically.
You have to come up with your own ‘reliable’ algorithm. It cannot become 100% because you can always decide to rest and/or move elsewhere but yes a timer is a reasonable approach.
Using owntracks/gpstracker, you can also have more geofences than just ‘work’ and ‘home’ so you could place some geofence waypoints on the way then if ‘home/enter’ is triggered, you can check if any of those waypoints were entered(+left again) in the last xx minutes, too (xx depending on how long it takes to get from there to your home).
You can also combine that with more sensor (door, motion detector) and turn back off TV if there’s no movement detected within another xx minutes after ‘home/enter’ is detected.
Well as I said if you have a door sensor and presence detection that was OFF when you were not at home then it should work
Presence was off so you were not home (via gpstracker, home wifi etc)
When returning gpstracker will show you within home range
When the entrance door opens you are back home so it will trigger your TV