Person - Use Device Tracker when driving

Is it possible to change device trackers to one person automatically?
I have the phone and an obd car tracker. When the person is driving, it should use the gps from obd, and when the person its not driving, it should use the gps from phone. Is this possible?

Set up a Template device tracker that switches as you want, then assign that to the Person instead of directly assigning the phone or OBD device trackers.

Or, the Spook custom integration has custom actions to add and remove device trackers from Persons programmatically.