thomasloven / lovelace-card-mod

🔹 Add CSS styles to (almost) any lovelace card
MIT License
1.04k stars 169 forks source link

styling map markers #374

Open joshburkard opened 2 months ago

joshburkard commented 2 months ago

My Home Assistant version: 2024.4.4

My lovelace configuration method (GUI or yaml): YAML

I'm trying to configure a map with multiple markers / entities, which should have different styles:

    cards:
      - type: map
        entities:
          - entity: sensor.green
            label_mode: state
          - entity: sensor.red
            label_mode: state
          - entity: sensor.blue
            label_mode: state
          - entity: sensor.yellow
            label_mode: state
        default_zoom: 11
        card_mod:
          style:
            ha-map $ ha-entity-marker $ div: |
              .marker {
                border-color: #008000 !important;
                background-color: #008000 !important;
                color: #FFFFFF !important;
               };

with above code, the first marker get styled as expected, but how can i style the other markers / entities ?

By putting an X in the boxes ([]) below, I indicate that I: