Harmony Hub-Multiple hubs, multiple activities

I’m new to hass.io, I’m trying to learn a as I go. I managed to get everything working on a RPi3. Next, I have 2 harmony hubs with 3 activities each. I keep reading the addon page and watching the same videos over and over hoping to catch something I missed and it’s confusing me more. All I want right now is to turn each activity on/off. What would my yaml file look like? The entire hubs are discovered but not activities.
Living Room
Watch TV
PS4
Retropie
Bedroom
TV
Movie
Watch Apple TV
Thanks

This is what I use. It keeps the front end and dashboards displaying the current activity as well. Hope this helps…

Sensors:
- platform: template
  sensors:
    lr_remote:
      value_template: '{{ states.remote.living_room_remote.attributes.current_activity }}'
      friendly_name: 'Living Room Remote'
    bedroom_remote:
      value_template: '{{ states.remote.bedroom_remote.attributes.current_activity }}'
      friendly_name: 'Bedroom Remote'
    basement_remote:
      value_template: '{{ states.remote.basement_remote.attributes.current_activity }}'
      friendly_name: 'Basement Remote'

input select:
lr_activity:    
    name: Living Room Remote
    initial: Select input
    options:
      - Select input
      - Watch TV
      - Watch Apple TV
      - PowerOff

bedroom_activity:    
    name: Bedroom Remote
    initial: Select input
    options:
      - Select input
      - Watch TV
      - PowerOff

basement_activity:    
    name: Basement Remote
    initial: Select input
    options:
      - Select input
      - Watch TV
      - Watch Apple TV
      - PowerOff

Automations:
- alias: lr_activity_change_tv
  trigger:
    - platform: state
      entity_id: input_select.lr_activity
      to: Watch TV
  action:
    - service: script.cable
    - delay: 5
    - service: input_select.select_option
      data:
        entity_id: input_select.lr_activiy
        option: Select input

- alias: lr_activity_change_atv
  trigger:
    - platform: state
      entity_id: input_select.lr_activity
      to: Watch Apple TV
  action:
    - service: script.atv
    - delay: 5
    - service: input_select.select_option
      data:
        entity_id: input_select.lr_activiy
        option: Select input

- alias: lr_activity_change_off
  trigger:
    - platform: state
      entity_id: input_select.lr_activity
      to: PowerOff
  action:
    - service: script.lrtvoff
    - delay: 5
    - service: input_select.select_option
      data:
        entity_id: input_select.lr_activiy
        option: Select input

- alias: basement_activity_change_atv
  trigger:
    - platform: state
      entity_id: input_select.basement_activity
      to: Watch Apple TV
  action:
    - service: script.basementatv
    - delay: 5
    - service: input_select.select_option
      data:
        entity_id: input_select.basement_activiy
        option: Select input

- alias: basement_activity_change_watchtv
  trigger:
    - platform: state
      entity_id: input_select.basement_activity
      to: Watch TV
  action:
    - service: script.basementcable
    - delay: 5
    - service: input_select.select_option
      data:
        entity_id: input_select.basement_activiy
        option: Select input

- alias: basement_activity_change_off
  trigger:
    - platform: state
      entity_id: input_select.basement_activity
      to: PowerOff
  action:
    - service: script.basementtvoff
    - delay: 5
    - service: input_select.select_option
      data:
        entity_id: input_select.basement_activiy
        option: Select input

- alias: bedroom_activity_change_watchtv
  trigger:
    - platform: state
      entity_id: input_select.bedroom_activity
      to: Watch TV
  action:
    - service: script.watch_tv_bed
    - delay: 5
    - service: input_select.select_option
      data:
        entity_id: input_select.bedroom_activiy
        option: Select input

- alias: bedroom_activity_change_off
  trigger:
    - platform: state
      entity_id: input_select.bedroom_activity
      to: Power Off
  action:
    - service: script.watch_tv_bed
    - delay: 5
    - service: input_select.select_option
      data:
        entity_id: input_select.bedroom_activiy
        option: Select input

- alias: inputselectsetlrtv
  trigger:
    platform: state
    entity_id: sensor.lrremote
  action:
    service: input_select.select_option
    entity_id: input_select.lr_activity
    data_template:
      option: '{{trigger.to_state.state}}'

- alias: inputselectsetbedroomtv
  trigger:
    platform: state
    entity_id: sensor.bedroom_remote
  action:
    service: input_select.select_option
    entity_id: input_select.bedroom_activity
    data_template:
      option: '{{trigger.to_state.state}}'

- alias: inputselectsetbasementtv
  trigger:
    platform: state
    entity_id: sensor.basement_remote
  action:
    service: input_select.select_option
    entity_id: input_select.basement_activity
    data_template:
      option: '{{trigger.to_state.state}}'

Scripts:
cable:
  alias: "watch cable"
  sequence:
    - service: remote.turn_on
      entity_id: remote.living_room_remote
      data:
        activity: 28975910

atv:
  alias: "watch atv"
  sequence:
    - service: remote.turn_on
      entity_id: remote.living_room_remote
      data:
        activity: 30802992

basementcable:
  alias: "basement cable"
  sequence:
    - service: remote.turn_on
      entity_id: remote.basement_remote
      data:
        activity: 30799264

basementtvoff:
  alias: "basement tv off"
  sequence:
    - service: remote.turn_on
      entity_id: remote.basement_remote
      data:
        activity: -1

basementatv:
  alias: "basement atv"
  sequence:
    - service: remote.turn_on
      entity_id: remote.basement_remote
      data:
        activity: 30798785

tv_off:
  alias: "tv off"
  sequence:
    - service: remote.send_command
      data_template:
        device: '48361989'
        activity: '-1'
        entity_id: remote.living_room_remote
1 Like

This is what it looks like on the dashboard also:

1 Like

With the greatest respect to @Darbos that’ll probably just confuse you even more as his set up is different and much more advanced than what you’re trying to achieve.

For info your best source is this thread which goes all the way back to when the component was first created…

Have a read through that as it covers what you’re after in detail and then come back with bits you don’t understand or need elaboration on. Unfortunately, incorporating a Harmony Hub is not the simplest component to start your HA adventure with as it relies on having already understood quite a lot of HA fundamentals but we’ll get you there :slight_smile:

2 Likes