Conditional Map?

using:

cards:

  - type: map
    entities: []
    geo_location_sources:
      - wwlln
    title: Lightning Strikes
    default_zoom: 6

results in a map with lightning strikes. However, if no strikes are available, it still shows the, albeit empty, map. Can we somehow use a condition for the map to only show if the entities exist?
I’ve tried the conditional card, but think we can only use verbose conditional entities, and not use something like:

type: conditional
conditions:
  - entity_id: '*.lightning_strike*'

like we can do with the monster card:

    card:
      type: custom:monster-card
      show_empty: false
      card:
        type: entities
        show_header_toggle: false
        title: Lightning strikes
      filter:
        include:
#          - entity_id: '*.lightning_strike*'
          - attributes:
              source: 'wwlln'

testing this for now:

      type: custom:monster-card
      show_empty: false
      card:
        type: map
        show_header_toggle: false
        title: Lightning strikes monster map
      filter:
        include:
#          - entity_id: '*.lightning_strike*'
          - attributes:
              source: 'wwlln'

any help is appreciated, thanks!

make a binary_sensor that counts the number of lightning_strike entities and compare that value to 0. Then make a conditional based on that.

a yes, that would be a smart hack…thanks!

as it is now, the monster configuration shows, but without the Map…

normal Map:

Monster map:

strange…

update

gave it some time and now the Map shows alright.

binary_sensor:
  - platform: template
    sensors:
      lightning_active:
        friendly_name: Lightning active
          value_template: >
            {{states('sensor.count_lightning_strikes')|int > 0 }}

and

  - platform: template
    sensors:
      count_lightning_strikes:
        value_template: >
          {{ states.geo_location|selectattr('attributes.source','eq','wwlln')|list|count }}

the conditional map:

  - type: conditional
    conditions:
      - entity: binary_sensor.lightning_active
        state: 'on'
    card:
      type: map
      dark_mode: true
      title: Lightning strikes conditional map
      geo_location_sources:
        - wwlln

hope this will create the conditional map

forgot (couldn’t find anymore) how to use the filter contain 'lightning_strike'