Advanced Camera Card - dynamically hide/show camera on condition

I have an advanced-camera-card with multiple camera feeds which works fine, however the camera have a ‘privacy mode’ which disables the camera feed and when enabled the feed displays ‘Camera unavailable’ and the camera’s json settings. I’m looking for a method to set the ‘hide’ value triggered by the state of the privacy mode.

type: custom:frigate-card
cameras:
  - camera_entity: camera.camera_east
  - camera_entity: camera.camera_west
    hide: true
overrides:
  - conditions:
    - condition: state
      entity: switch.camera_east_privacy_mode
      state: "on"
    set:
      'cameras.camera_entity[0]': { hide: 'true' }

However the above yaml produces and error, “Invalid configuration: [ “overrides[0] → conditions”, “overrides[0] → overrides” ]”.

Is there a way to accomplish this?

When this occurs it also reverts back to the frigate-card rather than the advanced-camera-card.

Thanks

:thinking:
This setup shows two camera feeds side-by-side, but only if their privacy mode is off.
When privacy mode is on, the corresponding camera is hidden from the view completely—preventing errors or “Camera unavailable” messages.

type: horizontal-stack
cards:
  - type: conditional
    conditions:
      - entity: switch.camera_east_privacy_mode
        state: "off"
    card:
      type: custom:frigate-card
      cameras:
        - camera_entity: camera.camera_east

  - type: conditional
    conditions:
      - entity: switch.camera_west_privacy_mode
        state: "off"
    card:
      type: custom:frigate-card
      cameras:
        - camera_entity: camera.camera_west

I had considered conditional cards, however my camera_east and camera_west was an example for simplicity sake. I have 6 cameras, and supporting all possible permutations was a path I wasn’t interested in going down.

After some more investigation I was able to configure a single card with the behavior I was interested in.

type: conditional
conditions:
  - condition: or
    conditions:
      - condition: state
        entity: switch.camera_east_privacy_mode
        state: "off"
      - condition: state
        entity: switch.camera_west_privacy_mode
        state: "off"
card:
  type: custom:advanced-camera-card
  cameras:
    - camera_entity: camera.camera_east
    - camera_entity: camera.camera_west
  overrides:
    - conditions:
        - condition: state
          entity: switch.camera_east_privacy_mode
          state_not: "off"
      delete:
        - cameras[0]
    - conditions:
        - condition: state
          entity: switch.camera_west_privacy_mode
          state_not: "off"
      delete:
        - cameras[1]