Tap_action and Hold_action with two different entities possible in one button card?

Is it possible to use a button card or a custom: button card and use two entities for it ?

I have an shelly switch to turn on a smart light and when the light is on I like to change for example the color temperature.

With one button card I want to us the tap_action for toggle the switch entity and with the hold_action I want to fire the service: more-info for the light entity.

Is this possible ?

Yes, this is possible with custom:button-card :


hold_action:
  action: more-info
  entity: light.xy

Thanks for you reply but I can get it to work. I use the code below.
But with the hold-action I get the more-info on the switch entity and I want the
more-info on the light entity.

If you have more tips, it’s most appreciated.

type: button
entity: switch.xy
tap_action:
  action: toggle
hold_action:
  action: more-info
  entity: light.xy

My example is part of custom:button-card. I’ve corrected it in my previous post.

Ah, thanks. With the custom: button-card it’s working nicely.