Harmony Hub Activities by Button Press - status color issue

Hi there!

During building a nice (at least to my opinion) horizontal stack button card for quickly accessing my Harmony Hub Activities I ran into a aesthetic issue.

While clicked on Power Off, the buttons grey our, which can be OK.
While switching to Watch TV or to Play Nintendo Switch, all 3 buttons state color change to yellow. Not only for the corresponding activity:

All greyed out (Power Off):
image

All yellow (in this case activity: Play Nintendo Switch)
image

I can ‘overrule’ the color state for the buttons (state_color: false) but than I cannot see which Activity is running. Is there a possibility to only color the state button yellow if a certain Activity is active? In practive:

If current activity is ‘Power Off’, 1st button yellow other greyed.
If current activity is ‘Watch TV’, 2nd button yellow, other greyed.
If current activity is ‘Play Nintendo Switch’ only third button yellow, other greyed.

Already I’ve tried to find a solution, but without any success. Anyone who can take a dive into this with me?

This is what I have now:

type: horizontal-stack
cards:
  - show_name: true
    show_icon: true
    type: button
    icon: mdi:television-off
    tap_action:
      action: call-service
      service: remote.turn_on
      data:
        activity: PowerOff
      target:
        entity_id: remote.harmony_hub
    entity: remote.harmony_hub
    show_state: false
    name: Power Off TV
  - show_name: true
    show_icon: true
    type: button
    icon: mdi:television
    tap_action:
      action: call-service
      service: remote.turn_on
      data:
        activity: Watch TV
      target:
        entity_id: remote.harmony_hub
    entity: remote.harmony_hub
    name: Watch TV
  - show_name: true
    show_icon: true
    type: button
    icon: mdi:nintendo-switch
    tap_action:
      action: call-service
      service: remote.turn_on
      data:
        activity: Play Nintendo Switch
      target:
        entity_id: remote.harmony_hub
    entity: remote.harmony_hub
    name: Play Nintendo Switch

the harmony integartion is creating for each of your acitivies an separate switch. use this instead of the call service action

That’s a quick answer, thanx!
Than I think I run into my lack of knowledge here. How or where can I find these specific switches?

you can find it in your integration / device section

At Controls there indeed is a drop down menu, which calls the activities directly. Nevertheless I would like to integrate the 3 Activities into 3 buttons as shown in the first post.

edit:
I think I was too quick. The 2 separate activities were disabled.

Now the buttons for Watch TV and Play Nintendo are working as expected. Nevertheless the Power Off button I preferred to be Yellow in case the PowerOff activity is active, instead of:

image

ah, because the power off is not an activity.
What I did was to create an script to power off and I’m executing the script within the button

I (temporarily) solved this bij setting state_color to false for the power off button. For now it’s acceptable that it always is greyed out. If only there was an option for state inversion :thinking:

Let’s vote for state inversion!

image

type: horizontal-stack
cards:
  - show_name: true
    show_icon: true
    state_color: false
    type: button
    icon: mdi:television-off
    tap_action:
      action: call-service
      service: remote.turn_on
      data:
        activity: PowerOff
      target:
        entity_id: remote.harmony_hub
    entity: remote.harmony_hub
    show_state: false
    name: Power Off TV
  - show_name: true
    show_icon: true
    type: button
    icon: mdi:television
    tap_action:
      action: toggle
    name: Watch TV
    entity: switch.harmony_hub_watch_tv
    show_state: false
  - show_name: true
    show_icon: true
    type: button
    icon: mdi:nintendo-switch
    tap_action:
      action: toggle
    name: Play Nintendo Switch
    entity: switch.harmony_hub_play_nintendo_switch