Try with this, it should do something similar to what you are searching:
card_mod:
style:
ha-map$: |
{% set entities = config.entities | map(attribute='entity') | list %}
{% for entity in entities %}
{% if is_state(entity, 'not_home') %}
ha-entity-marker[entity-id="{{ entity }}"] {
filter: grayscale(1) brightness(1.75);
}
{% endif %}
{% endfor %}
Edit: by the way, I have set up a docker instance and card_mod
works in the same way in a map dashboard. You can use the same code as before, but removing the first part, you can iterate directly in the list because it is a list of entity ids:
card_mod:
style:
ha-map$: |
{% for entity in config.entities %}
{% if is_state(entity, 'not_home') %}
ha-entity-marker[entity-id="{{ entity }}"] {
filter: grayscale(1) brightness(1.75);
}
{% endif %}
{% endfor %}