Conditional action in UI cards

Hi, i’m pretty new here,
Is there a way for setting up a button that does something different each time you press it?
For example:
lets say i have this card

 - type: "custom:button-card"
  tap_action:
    action: call-service
    service: scene.turn_on
    service_data: 
      entity_id: scene.guests

I would like to execute scene “guests” when i press it, and execute scene “normal” when I press it again
and possibly change the color of the card.

Something like this pseudo conf:

 - type: "custom:button-card"
  tap_action:
    action: call-service
    service: conditional.binary
    service_data: 
      expression: states['some_var'].state == 1
      true: <call service->scene->guests>
      false: <call service->scene->normal>

I’m not sure if this is the place for this question so sorry if its misplaced.

You’d create a script to handle this and call the script.