Adding Harmony buttons to toggle activities with Lovelace


#1

I’m trrying to add a Lovelace button that turn on a given harmony activirty. Right now, it only turns on the default activity even when I specify another one like this:

- type: entity-button
        service: remote.turn_on
        activity: "Watch PC"
        entity: remote.studio_hub
        tap_action: call-service
        data:
          activity: "Watch PC"

What’s the correct syntax for just turning on an activity other than the default? I’ve tried a few different ways of specifying the activity (by number, without the data: prefix) and it still doesn’t work. No errors appear and it just launches the default activity.


#2

I suggest you read the entity-button docs. You seem to be adding random config items and should troubleshoot any service-calls using the Services in Developer tools


#3
- type: entity-button
            name: play switch
            icon: mdi:gamepad
            entity: [remote.studio_hub]
            tap_action:
              action: call-service
              service: remote.turn_on
              service_data:
                entity_id: remote.studio_hub
                activity: "Play Switch"

#4

this is a link to a setup I used in the past, it’s outdated from what I currently use but it should be what you are looking for.

The general idea behind it is to make template switches that act as radio buttons. I.E only 1 can be on at a time. This is covered in the link. Once you have those template switches, those are what you use in lovelace. Place them into a picture glace and you’ll have a nice end product.

EDIT: You can ignore all the receiver stuff in the link and focus on the harmony remote items.