Merge pull request #13228 from voydz/lovelace-map-autofit

This commit is contained in:
Zack Barett 2022-07-19 16:44:48 -05:00 committed by GitHub
commit 826474518f
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
2 changed files with 2 additions and 0 deletions

View File

@ -134,6 +134,7 @@ class HuiMapCard extends LitElement implements LovelaceCard {
)} )}
.zoom=${this._config.default_zoom ?? 14} .zoom=${this._config.default_zoom ?? 14}
.paths=${this._getHistoryPaths(this._config, this._history)} .paths=${this._getHistoryPaths(this._config, this._history)}
.autoFit=${this._config.auto_fit}
.darkMode=${this._config.dark_mode} .darkMode=${this._config.dark_mode}
></ha-map> ></ha-map>
<ha-icon-button <ha-icon-button

View File

@ -265,6 +265,7 @@ export interface MapCardConfig extends LovelaceCardConfig {
type: "map"; type: "map";
title?: string; title?: string;
aspect_ratio?: string; aspect_ratio?: string;
auto_fit?: boolean;
default_zoom?: number; default_zoom?: number;
entities?: Array<EntityConfig | string>; entities?: Array<EntityConfig | string>;
hours_to_show?: number; hours_to_show?: number;