Hide service button in picture elements card

I have a picture elements card that i’m using for a floorplan.
I have a service-button that calls a script, that bit works fine but I want the service button to only show up if the state of an input_boolean is on, I’ve tried this with condition: but it doesn’t work.
any help much appreciated, go easy i’m relatively new to this :smiley:


 - type: service-button
    title: White Off
    condition:
      condition: state
      entity_id: input_boolean.ha_aquarium_white
      state: 'on'
    service: script.turn_on
    service_data:
      entity_id: script.script_fish_tank_white_off
    style:
      left: 57%
      top: 30%

Conditional element.

Thanks… that’s exactly what I needed