Summary: Allow Users define polygon zones for large areas that are in close proximity to other zones. Examples of theses types of places could be University and company campuses or business parks.
Some Ideas on how to do it: I have thought of one way of doing it and that is to have a tool on the home-assistant site that will mainly do the work client side that will allow the user to select a way from Open Street Map to be a polygon, this will the fetch the Info from OSM and encode it in a way home assistant can understand, this could be a YAML Dictionary or JSON. this would the be used along side the existing zone lat long and radius making them optional or ignored if using polygons.
The reason for having a tool on the site would be to reduce the load on OSM’s servers as people will only get the data once instead of on every reboot, it is also easier to select it from a map than to use the Map data layer on openstreetmap.com to get the way number
I would love this, there’s a great need for it, since mos building have polygon shapes, and trying to create a zone in a rectangular building ends up creating a massive circle with tons of incorrect parts.
This would make me drop Google share location between my wife and I, would be nice If we used HA for that.
Still looking for something that can do this…if this was supported I wouldn’t need to mess around with Life 360 / Owntracks / Google Maps… Interestingly I was looking at how to do this…it just didn’t seem like something that wouldn’t work out of the box…
Is there any chance that zones will get other shapes? It would be nice to be able to pack zones in an area and not have some of the oddities of overlapping zones.
First, you can upvote your own feature request
Second, nice idea, but personally I don’t think GPS location is precise enough that you would have any benefits from this.
I’ve recently implemented this for geolocation integrations - if you think of a square/rectangle as a polygon with four vertices and right angles. Also supports bounding boxes where you define bottom left and top right corner of a rectangle.
Python code is here: