The Google Maps integration will automagically see any other account that is shared with the account you point it at (and provide a cookie file for.) The first time it sees an account, it will be added to known_devices.yaml and a device_tracker
entity will be created. That can be at any time, not just at startup. Then on next startup, “restored” device_tracker
entities will be created for everything in known_devices.yaml, and the state of those entities will be updated as their corresponding accounts are “seen”.
But to try to answer your question more directly, you can “point” the integration at as many accounts as you like. For each account you’ll need a cookie file. In theory, you should only have to create each of those cookie files once, independently of what other accounts are shared with them, or when they get shared. The cookie files will eventually expire, but in my experience, that is after about a year.
There are two reasons, I would say, for configuring more than one account. The first reason is that the device_tracker
entity created for the account itself will be lacking two attributes, battery_level
& entity_picture
. (Actually, it will have battery_level
, but its value will be null.) So, to get all the attributes for that account, you need a different account to be configured that the first account has been shared with.
So, concrete example. Account A is your “normal” account, and accounts C through F have been shared with it. This will create entities for A & C through F, but the entity for A is lacking attributes. To get all those attributes, you configure account B that A has been shared with. Now B creates an entity for itself (lacking attributes) and one for A (with all its attributes.)
But wait, there are two entities for A. Isn’t that a conflict? Well, turns out, no. Normally, the entity IDs are device_tracker.google_maps_NNNN
, where NNNN is a number unique to that account. But the entity that A creates for itself has a different entity ID, more like device_tracker.google_maps_SLUGIFIED_EMAIL_ADDRESS
. The one you want to use for A is the one from account B, which will have the usual entity ID format and all the attributes for A.
Clear as mud?
EDIT:
Oh, the second reason would be to see more accounts and create more entities. E.g., A can see C through F, and G can see I through K. You might then configure A & G to get C through F & I through K. (And then you might want to create B to see all of A and H to see all of G. )