Picture Entity Card - State Filter - Unavailable State?

Using the docs here Picture Entity Card - Home Assistant I have tried setting up a state filter to change the style of the image when the entity is not available. It works OK for “off” but if I remove power to the sonoff the entity goes unavailable and the style doesn’t work.

My config looks like this…

      - entity: s``witch.3d_printer
        type: picture-entity
        image: /local/images/prusa_printer.jpg
        state_filter:
        'off': 'filter: grayscale(100%);'
        'unavailable': 'filter: sepia(100%);'
        hold_action:
          action: more-info
        tap_action:
          action: toggle
        show_icon: false
        show_name: false
        show_state: false

Is “unavailable” not a valid state or have I screwed up the config?

It Works for me with this code

show_state: true
show_name: true
camera_view: auto
type: picture-entity
entity: light.lumieres_entree
tap_action:
  action: toggle
hold_action:
  action: none
grid_options:
  columns: 9
  rows: 3
name: Entrée
image: /api/image/serve/672f0c50ff5221ea51206866d690f41f/512x512
state_filter:
  "on": brightness(100%)
  "off": grayscale(100%)
  unavailable: blur(5px)