Logitech Harmony Integration with @iandday's component

I would correct your indents as that may be causing the issue.

script:
  htpc:
    sequence:
      service: remote.turn_on
      entity_id: remote.living
      data:
        activity: "22992000"
  xbox:
    sequence:
      service: remote.turn_on
      entity_id: remote.living
      data:
        activity: "23482024"
  shield:
    sequence:
      service: remote.turn_on
      entity_id: remote.living
      data:
        activity: "23452661"

Sorry but indents?

‘\t’ refers to a tab. YAML will error out if you use tabs instead of spaces.

indentations. Each subsection must be indented 2 spaces from it’s branch. If you look at the updated script I posted in my earlier reply, you can see that htcp" is indented 2 spaces from script:. sequence: is intended 2 spaces from htpc:. This is how hass knows the hierarchy of your configuration.

Thank you. Got that resolved now I’m facing this:

did not find expected ‘-’ indicator while parsing a block collection at line 324 column 3

care to post that section of your config?

automation:
  - alias: "Powered off from Harmony Hub"
    trigger:
      platform: state
      entity_id: remote.living
    condition:
      condition: template
      value_template: '{{ trigger.to_state.attributes.current_activity == "PowerOff" }}'
    action:
      service: input_select.select_option
      entity_id: input_select.living_room_tv
      data:
        option: "Powered Off"

Line 324 would be right at " - alias"

That’s odd. I’m not sure why it would be upset about the ‘-’ in that column. I can say that the quotes surrounding your alias are unnecessary and could cause other issues though.

Removed the quotes but still no luck unfortunately.

Yup. You should only have one automation: with all of your automations listed directly under it (unless you’re using an !include)

If you want to post your entire config, I can give it a once over.

Hi, Sorry, I’d like to get this setup myself. I used AIO installer and I get stuck at this line

Just fails because it doesn’t exist. Where do I need to put this if I used AIO Installer?

Likely because my instructions at the beginning of this thread are back from when this plugin was still in beta and it has to be manually installed. Unfortunately I can no longer edit my post to let people know that that step is no longer necessary.

You no longer have to manually install this plugin. It’s now part of Home Assistant.

Hi, i’m starting to learn and understanding HomeAssistant. I want to control my harmony ultimate with HA. I used your configuration. I have no errors but my harmony does not react to the activities I select.

I’ve changed my activity numbers in the automation section (

Activities
24250166 - TV kijken
-1 - PowerOff
24284482 - Ochtend
24250196 - Xbox One
24250186 - Film kijken

my code :

remote:
  - platform: harmony
    name: living room
    host: 192.---.-.---
    
platform: harmony
name: living room





input_select:
  harmony:
    name: Harmony Control
    options:
     - TV kijken
     - PowerOff
     - Ochtend
     - Xbox One
     - Film kijken
    icon: mdi:monitor


automation:

- alias: Harmony
  hide_entity: True
  trigger:
    platform: state
    entity_id: input_select.harmony
    from: 'Select Input'
  action:
    - service: remote.turn_on
      entity_id: remote.living_room
      data_template:
        activity: >
          {% if is_state("input_select.harmony", "TV kijken") %}
            24250166
          {% elif is_state("input_select.harmony", "Ochtend") %}
            24284482
          {% elif is_state("input_select.harmony", "Xbox One") %}
            24250196
          {% elif is_state("input_select.harmony", "Film kijken") %}
            24250186
          {% else %}
          {% endif %}
    - service: input_select.select_option
      entity_id: input_select.harmony
      data_template:
        option: "Select Input"

- alias: Harmony Off
  hide_entity: True
  trigger:
    platform: state
    entity_id: input_select.harmony
    to: 'Power Off'
  action:
    - service: remote.turn_off
      entity_id: remote.living_room
    - service: input_select.select_option
      entity_id: input_select.harmony
      data_template:
        option: "Select Input"

Can you/someone see what i’m doing wrong ?

Thanx in advance !

Your input_select was missing “Select Input” which is required to activate the automation. It will only trigger when the input_select changes from “Select Input.” I updated your input_select below. It should work now.

input_select:
  harmony:
    name: Harmony Control
    options:
     - TV kijken
     - PowerOff
     - Ochtend
     - Xbox One
     - Film kijken
     - Select Input
    icon: mdi:monitor

Hi !

Thanks it works now (it responds). Only the source of the tv doesn’t change to the correct source input. With the remote it change to the correct input. Any idea how thats possible ? Anyway i’m glad you solved my first problem ! Thanx for the quick reply !

I’m not sure, since the script and the harmony component simply tell the hub to trigger the activity rather than send the individual commands.

Indeed thats what I tought! I’ll look into it tomorrow! Thnx for your help!

I’ve implemented your config for the harmony activities, and it’s the only one I found that actually lets me power off the devices. All other options didn’t work.
But I am now getting an odd error in the logs, and was wondering if you’d have any idea:

ERROR (Thread-3) [homeassistant.components.remote.harmony] No activity specified with turn_on service

I can supply my configs it it might help?

I had some issues at first and it turned out to be minor errors in my config. Sounds like that’s what’s happening with you too. If you post your config I can try to help you