Skip to content

Commit 4fafc66

Browse files
jeradMfabaff
authored andcommitted
Add default_zoom to map card docs. (home-assistant#6113)
1 parent c9e8f61 commit 4fafc66

File tree

1 file changed

+12
-0
lines changed

1 file changed

+12
-0
lines changed

source/_lovelace/map.markdown

Lines changed: 12 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -40,17 +40,29 @@ aspect_ratio:
4040
description: "The map's height:width ratio."
4141
type: string
4242
default: "100%"
43+
default_zoom:
44+
required: false
45+
description: The default zoom level of the map.
46+
type: integer
47+
default: 14 (or whatever zoom level is required to fit all visible markers)
4348
{% endconfiguration %}
4449

4550
<p class='note'>
4651
Only entities that have latitude and longitude attributes will be displayed on the map.
4752
</p>
4853

54+
<p class="note">
55+
The `default_zoom` value will be ignored if it is set higher than the current zoom level
56+
after fitting all visible entity markers in the map window. In other words, this can only
57+
be used to zoom the map _out_ by default.
58+
</p>
59+
4960
## {% linkable_title Examples %}
5061

5162
```yaml
5263
- type: map
5364
aspect_ratio: 100%
65+
default_zoom: 8
5466
entities:
5567
- device_tracker.demo_paulus
5668
- zone.home

0 commit comments

Comments
 (0)