thomasloven / lovelace-card-mod

🔹 Add CSS styles to (almost) any lovelace card

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

styling map markers

joshburkard opened this issue · comments

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:

  • Understand that this is a channel for reporting bugs, not a support forum (https://community.home-assistant.io/).

  • Have made sure I am using the latest version of the plugin.

  • Have followed the troubleshooting steps of the "Common Problems" section of https://github.com/thomasloven/hass-config/wiki/Lovelace-Plugins.

  • Understand that leaving one or more boxes unticked or failure to follow the template above may increase the time required to handle my bug-report, or cause it to be closed without further action.