thomasloven / lovelace-auto-entities

🔹Automatically populate the entities-list of lovelace cards
MIT License
1.18k stars 111 forks source link

Map card: may show a minimal zoom when placed inside auto-entities #441

Open ildar170975 opened 2 months ago

ildar170975 commented 2 months ago

Consider the code:

type: vertical-stack
cards:
  - type: custom:auto-entities
    card:
      type: map
      auto_fit: true
      fit_zones: true
    entities:
      - zone.home
    filter:
      include:
        - entity_id: person.ildar

Use-case: show device_tracker or person entities AND some zone. Here I chose one particular person entity & home zone.

Select a dashboard in STORAGE mode, add a new card with this code. How it is displayed: image

Zoom is minimal. Pressing F5 does not help.

Save the dashboard (exit "edit mode") - still zoom is minimal: image Pressing F5 does not help.

Go back to "edit mode" - the card is shown normal (zoom is OK). Press F5 - again zoom is minimal.

In these cases I do not observe the issue:

  1. The card is shown in Editor.
  2. Same card is placed on a dashboard in YAML mode.
  3. No vertical-stack is used:
    type: custom:auto-entities
    card:
      type: map
      auto_fit: true
      fit_zones: true
    entities:
      - zone.home
    filter:
      include:
        - entity_id: person.ildar
  4. auto-entities is not used:
    type: vertical-stack
    cards:
    - type: map
    auto_fit: true
    fit_zones: true
    entities:
      - zone.home
      - person.ildar
  5. Those auto_fit & fit_zones options have different values or omitted (i.e. using default false values).