How to cofigure harmony for sensor?

I am trying to follow this guide for harmony sensors

where do i put in my activity?

EXAMPLES

Template sensors can be utilized to display current activity in the frontend.

sensor:
  - platform: template
    sensors:
      family_room:
        value_template: '{{ states.remote.family_room.attributes.current_activity }}'
        friendly_name: 'Family Room'
      bedroom:
        value_template: '{{ states.remote.bedroom.attributes.current_activity }}'
        friendly_name: 'bedroom'

What do you mean? Are you trying to create a user interface that allows you to change the activity?

for the most part yes, I prefer to use a switch so I can sync it with alexa

Take a look at the activity template switches I use in this post:

1 Like

So why not to use switch instead of sensor?

- platform: template
  switches:
    harmony_tv:
      friendly_name: 'TV'
      value_template: "{{ is_state_attr('remote.harmony_hub', 'current_activity', 'TV') }}"
      turn_on:
        service: remote.turn_on
        entity_id: remote.harmony_hub
        data:
          activity: TV
      turn_off:
        service: remote.turn_off
        entity_id: remote.harmony_hub
      icon_template: mdi:television-classic

That’s what the link shows.