Button Card: Different entities for tap and hold actions

Hello!

Maybe it’s available through other methods, but it would be be very useful if the hold action and the tap action could be targeted to two different entities.

It would also be useful if one could change the colour of the icon based upon the colour of a light. I know that if you point it towards a light in the entity field, it will automatically use the light’s colour, however there are cases where the entity field is pointed at a toggle (which then activates an automation), rather than a physical light.

Thanks!

The grid card does not have a tap or hold action. The cards you put in the grid may have these options.

For example, the entities card. This card supports tap, double tap and hold for separate entities.

Typo. I meant the button card. I’ve updated the title.

Certainly you could have scripts or automation that are called which target different entities.

You can specify a different entity id for each of the hold and tap actions of the button card.

type: button
name: Toggle Lights
show_state: false
tap_action:
  action: call-service
  service: light.toggle
  data:
    entity_id: light.some_light
hold_action:
  action: call-service
  service: light.toggle
  data:
    entity_id: light.some_other_light
2 Likes

By George, That worked beautifully! Also got it showing the light colour without toggling the light itself. Thanks!