Add auto_fit config option to lovelace map card

This commit is contained in:
Felix Rudat 2022-07-19 17:45:48 +02:00
parent bd50d6a6a3
commit cb256bc386
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}
.paths=${this._getHistoryPaths(this._config, this._history)}
.autoFit=${this._config.auto_fit}
.darkMode=${this._config.dark_mode}
></ha-map>
<ha-icon-button

View File

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