Key 'card_mod' is not expected or not supported by the visual editor

I have just started using the card mod after installing through HACs. I have the following lines in config.yaml

frontend:
  themes: !include_dir_merge_named themes
  extra_module_url:
    - /hacsfiles/lovelace-card-mod/card-mod.js?hacstag=190927524410

The same url is showing in dashboards-resources.

I have entered the following in a dashboard for an entity and the entity text colour has changed to blue but I get a warning when trying to edit the secondary information.

entity: switch.up111_rtl_15_socket_1
secondary_info: last-changed
name: Dummy LED TV
icon: mdi:television
card_mod:
  style: |
    :host {
      color: blue;
    }    

**Visual editor not supported**
* Key 'card_mod' is not expected or not supported by the visual editor.
* The provided value for '' is not supported by the visual editor. We support (string) but received ({"entity":"switch.up111_rtl_15_socket_1","secondary_info":"last-changed","name":"Dummy LED TV","icon":"mdi:television","card_mod":{"style":":host {\n color: blue;\n} \n"}}).
You can still edit your config using YAML.

I also do not get the little brush icon next to “show visual editor” as mentioned in the read me.

You probably mean Entities card.
The “visual editor not supported” warning is shown when you get to yaml editor for a particular entity row:

But it is not shown when you are editing a whole card:

In short - do not bother about that warning. Card-mod is a 3rd party plugin which may cause such glitches.

FYI: The style brush got lost when Frontend updated buttons during in 2025.8. 4.2.0 will bring back the style brush by upadting how card-mod finds the button to add the brush.