Need help configuring harmony hub!

I would really like to do what this guy did on his configuration and use the template switch with harmony

I was able to create a remote for it, but doesn’t really work, however, the harmony_living_room.conf shows up with everything that it can control (and my activity - which is important)

The only thing i have in my developer tools for harmony is the following
remote.living_room off current_activity: PowerOff friendly_name: Living Room

How do i turn on and off my activity using a template switch?
I would like to do this eventually, but only working on one activity to make sure it works Harmony Hub Best Practice

switch:
  - platform: template
    switches:
      value_template: "{{ is_state_attr('remote.living_room', 'current_activity', 'Listen to Music') }}"
      turn_on:
        service: remote.turn_on
        data:
          entity_id: remote.living_room
          activity: 'Listen to Music'
      turn_off:
        service: remote.turn_on
        data:
          entity_id: remote.living_room
          activity: 'PowerOff'

what does this mean? do i need another switch? im so lost

Configuration invalidCHECK CONFIG

Invalid config for [switch.template]: expected a dictionary for dictionary value @ data[‘switches’][‘value_template’]. Got “{{ is_state_attr(‘remote.living_room’, ‘current_activity’, ‘Listen to Music’) }}” extra keys not allowed @ data[‘switches’][‘turn_off’][‘data’]. Got OrderedDict([(‘entity_id’, ‘remote.living_room’), (‘activity’, ‘PowerOff’)]) extra keys not allowed @ data[‘switches’][‘turn_off’][‘service’]. Got ‘remote.turn_on’ extra keys not allowed @ data[‘switches’][‘turn_on’][‘data’]. Got OrderedDict([(‘entity_id’, ‘remote.living_room’), (‘activity’, ‘Listen to Music’)]) extra keys not allowed @ data[‘switches’][‘turn_on’][‘service’]. Got ‘remote.turn_on’ required key not provided @ data[‘switches’][‘turn_off’][‘turn_off’]. Got None required key not provided @ data[‘switches’][‘turn_off’][‘turn_on’]. Got None required key not provided @ data[‘switches’][‘turn_off’][‘value_template’]. Got None required key not provided @ data[‘switches’][‘turn_on’][‘turn_off’]. Got None required key not provided @ data[‘switches’][‘turn_on’][‘turn_on’]. Got None required key not provided @ data[‘switches’][‘turn_on’][‘value_template’]. Got None. (See ?, line ?). Please check the docs at https://home-assistant.io/components/switch.template/

You’re missing a name for the switch:

switch:
  - platform: template
    switches:
      the_switch_name: #<---- MISSING
        value_template: "{{ is_state_attr('remote.living_room', 'current_activity', 'Listen to Music') }}"
        turn_on:
          service: remote.turn_on
          data:
            entity_id: remote.living_room
            activity: 'Listen to Music'
        turn_off:
          service: remote.turn_on
          data:
            entity_id: remote.living_room
            activity: 'PowerOff'
1 Like