mirror of
https://github.com/home-assistant/home-assistant.io.git
synced 2025-07-27 19:26:50 +00:00
Update google_maps.markdown (#10279)
Documentation updated to match change in https://github.com/home-assistant/home-assistant/pull/26361
This commit is contained in:
parent
691c628e63
commit
f75b9cc1ab
@ -17,17 +17,10 @@ The `google_maps` platform allows you to detect presence using the unofficial AP
|
||||
You first need to create an additional Google account and share your location with that account. This platform will use that account to fetch the location of your device(s).
|
||||
|
||||
1. You have to setup sharing through the Google Maps app on your mobile phone. You can find more information [here](https://support.google.com/accounts?p=location_sharing).
|
||||
2. You must use `mapscookiegettercli` to get a cookie file which can be used with this device tracker. See more information [here](#maps-cookie-getter)
|
||||
2. You need to use the cookies from that account after you have properly authenticated which you can retrieve with either [Export cookies](https://addons.mozilla.org/en-US/firefox/addon/export-cookies-txt/?src=search) for firefox (make sure that "Prefix HttpOnly cookies" is unchecked) or [cookies.txt](https://chrome.google.com/webstore/detail/cookiestxt/njabckikapfpffapmjgojcnbfjonfjfg?hl=en-US) for chrome.
|
||||
3. Save the cookie file to your Home Assistant configuration directory with the following name: `.google_maps_location_sharing.cookies.` followed by the slugified username of the NEW Google account.
|
||||
- For example: if your email was `location.tracker@gmail.com`, the filename would be: `.google_maps_location_sharing.cookies.location_tracker_gmail_com`.
|
||||
|
||||
<div class='note warning'>
|
||||
|
||||
Since this platform is using an unofficial API with the help of [locationsharinglib](https://github.com/costastf/locationsharinglib), Google seems to block access to your data the first time you've logged in with this platform.
|
||||
This issue can be fixed by logging in with your new account and approving your login on the [Device Activity](https://myaccount.google.com/device-activity) page.
|
||||
|
||||
</div>
|
||||
|
||||
To integrate Google Maps Location Sharing in Home Assistant, add the following section to your `configuration.yaml` file:
|
||||
|
||||
```yaml
|
||||
@ -52,19 +45,3 @@ scan_interval:
|
||||
default: 60
|
||||
type: integer
|
||||
{% endconfiguration %}
|
||||
|
||||
### Maps Cookie Getter
|
||||
|
||||
You must run the [`mapscookiegetter`](https://mapscookiegettercli.readthedocs.io/en/latest/) tool to get the cookie file from a computer with a Web Browser. To install, your computer must have Python 3 and PIP installed:
|
||||
|
||||
```shell
|
||||
pip3 install mapscookiegettercli
|
||||
```
|
||||
|
||||
Then run the command:
|
||||
|
||||
```shell
|
||||
maps-cookie-getter
|
||||
```
|
||||
|
||||
This will open up a browser window for you to log-in to the NEW Google Account (the one you are sharing the location with, not your normal account). After logging in, the program will save the pickled cookie file `location_sharing.cookies` in the same directory as you ran the command from. Copy this to your Home Assistant configuration directory and rename as described above.
|
||||
|
Loading…
x
Reference in New Issue
Block a user