I just discovered the Map component, but there are no instructions on how to use it. I enabled it in my configuration.yaml, but I can’t find that it does anything. I guess it needs to be configured with coordinates for a device_tracker, but I can’t figure out how to do that. I want something to replace google maps after they have started to charge for map usage.
Yup - you’ll need to set up some device_trackers and some zones to make that useful. I use the Automatic component and can see on the map where my kid’s car is currently. I set up zones around school and work and can trigger events based on entering/exiting those zones.
Thanks. Do you have a code example I can look at? I was hoping to be able to use device_tracker.XXX.attributes.latitude/-longitude, but maybe the component doesn’t work like that.
If you are using device tracking for devices that leave the home, and report back, it will just show up on the map. They will not show up when they are at home.
The problem is I don’t even know what to look for in HA. I have added map:
to my configuration.yaml, but then what? How can I call it from the frontend for e.g. my car when it is away?
uh.
You hit the ‘hamburger’ menu on the left at the top of the web page, and click on MAP?
Ok, I see. I thought it was a component I could use in one of my views. It seems to only plot the position of my house. How do I get it to show other devices, such as my car?
Sorry for the stupid questions.
You can do that.
Check my config files in the initial post:
Search in de ui-lovelace.yaml for the header “People”
Add zones and it will show more locations.
When you leave, if you are device tracking your car (owntracks, ios app, or whatever), it will just show the device you are tracking on the map.
Ok, I will have to look into the use of zones. Atm the only device_tracker I am interested in is my car, e.g. to see where it is parked, which could be more or less anywhere in southern Sweden.
You don’t have to use zones. When you leave your home, your device will show up on the map. It does not show devices at your home on the map
Ok, good to know. However, I did not see my car when it was away from the house a while ago. I enlarged the map to include what I thought to be the whereabouts of it, but could not see anything on the map.
HOW are you tracking your car?
What device tracker are you using? Is it set to track: true
on your known_devices.yaml?
It is Volvo On Call. It worked fine with Google maps, but now they want to charge me for the map data. It gives me its coordinates, which I would like to just plot on a simple map.
Does it show up in the DEVICE_TRACKER section of your dev-state page?
It does indeed, including source_type: gps as well as coordinates.
And in your known_devices.yaml file that device is set to track: true
?
if that is the case, there is literally nothing to plot on the map. It will just track it and show up on the map.
Yes, it has track: true
in the known_devices.yaml.
Wow, thanks for this post. I did not know the Map could do so much more than show my home location.
Not to hijack the thread, but is there a way to use an image instead of the MDI Icon for a zone on my map?