Input_select causing errors with harmony stuff?

I was setting up my Harmony Hub to be able to control it thru HA. Getting a couple errors and from some reading think it may be input_select related but no clue. Have another error now with another integration that was working fine up until the other day and it also has input_select as part of it. The errors I’m getting say when I turn on the TV with the remote are:

Unable to find referenced entities script.turn_on_watch_tv_activity
Unable to find referenced entities script.turn_off_activity

They seem to exist. Below is what I setup:

input_select.harmony_tv_source.yaml:

harmonytvsource:
  name: Harmony Activities
  options:
    - Select Activity
    - Watch TV
    - Listen To Music
    - PowerOff
  initial: Select Activity

automations_harmony_tv_source:

- alias: TV Source Automation
  trigger:
    platform: state
    entity_id: input_select.harmonytvsource
  action:
    - service: remote.turn_on
      data_template:
        entity_id: >
         {% if is_state('input_select.harmonytvsource', 'Watch TV') %}
         script.turn_on_watch_tv_activity
         {% elif is_state('input_select.harmonytvsource', 'Listen To Music') %}
         script.turn_on_listen_to_music_activity
         {% elif is_state('input_select.harmonytvsource', 'PowerOff') %}
         script.turn_off_activity
         {% endif %}

# Update input_select for TV Source
- alias: Update Hub TV Source
  trigger:
    platform: state
    entity_id: remote.familyroom_hub
  condition:
    condition: template
    value_template: "{{ trigger.to_state.attributes.current_activity in state_attr('input_select.harmonytvsource', 'options') }}"
  action:
    service: input_select.select_option
    data_template:
      entity_id: input_select.harmonytvsource
      option: "{{ trigger.to_state.attributes.current_activity }}"

scripts_harmony.yaml:

# ACTIVITIES
turn_on_watch_tv_activity:
  alias: Watch TV
  sequence:
    - service: remote.turn_on
      entity_id: remote.familyroom_hub
      data:
        activity: "Watch TV"

turn_off_watch_tv_activity:
  alias: Turn Off Watch TV
  sequence:
    - service: remote.turn_off
      entity_id: remote.familyroom_hub
      data:
        activity: "Watch TV"

turn_on_listen_to_music_activity:
  alias: Listen To Music
  sequence:
    - service: remote.turn_on
      entity_id: remote.familyroom_hub
      data:
        activity: "Listen to Music"

turn_off_listen_to_music_activity:
  alias: Turn Off Listen To Music
  sequence:
    - service: remote.turn_off
      entity_id: remote.familyroom_hub
      data:
        activity: "Listen to Music"

turn_off_activity:
  alias: Turn Off Active Activity
  sequence:
    - service: remote.turn_off
      entity_id: remote.familyroom_hub
      data:
        activity: "PowerOff"
# END ACTIVITIES

See anything I did wrong? As noted something is effecting an automation I did a while ago to notify me when my washer or dryer is done. The part it’s breaking is when it’s done if no one is home, it waits for someone to get home and only alerts them. Now it just alerts everyone when it’s done so assuming it’s tied to the above unless some of the recent HA updates is causing this.

Thoughts?

Thanks.

JR

Not sure if you’ve stumbled across this way of doing things, it creates a toggle switch for each activity. The switch will remain synchronised with the actual state which I note from your other post you’re trying to do with the input_select.

switch:
  - platform: template
    switches:
      lounge_tv:
        friendly_name: Lounge TV
        value_template: "{{ is_state_attr('remote.lounge', 'current_activity', 'SHIELD TV') }}"
        turn_on:
          service: remote.turn_on
          data:
            entity_id: remote.lounge
            activity: "SHIELD TV"
        turn_off:
          service: remote.turn_on
          data:
            entity_id: remote.lounge
            activity: "PowerOff"
        icon_template: >-
          {% if is_state_attr('remote.lounge', 'current_activity', 'SHIELD TV') %}
            mdi:television
          {% else %}
            mdi:television-off
          {% endif %}

      soundbar:
        friendly_name: Soundbar
        value_template: "{{ is_state_attr('remote.lounge', 'current_activity', 'Soundbar') }}"
        turn_on:
          service: remote.turn_on
          data:
            entity_id: remote.lounge
            activity: "Soundbar"
        turn_off:
          service: remote.turn_on
          data:
            entity_id: remote.lounge
            activity: "PowerOff"
        icon_template: >-
          {% if is_state_attr('remote.lounge', 'current_activity', 'Soundbar') %}
            mdi:music
          {% else %}
            mdi:music-off
          {% endif %}

      ps3:
        friendly_name: PS4
        value_template: "{{ is_state_attr('remote.lounge', 'current_activity', 'PS4') }}"
        turn_on:
          service: remote.turn_on
          data:
            entity_id: remote.lounge
            activity: "PS4"
        turn_off:
          service: remote.turn_on
          data:
            entity_id: remote.lounge
            activity: "PowerOff"
        icon_template: >-
          {% if is_state_attr('remote.lounge', 'current_activity', 'PS4') %}
            mdi:playstation
          {% else %}
            mdi:playstation
          {% endif %}

      usbc:
        friendly_name: USB-C
        value_template: "{{ is_state_attr('remote.lounge', 'current_activity', 'USB-C Cable') }}"
        turn_on:
          service: remote.turn_on
          data:
            entity_id: remote.lounge
            activity: "USB-C Cable"
        turn_off:
          service: remote.turn_on
          data:
            entity_id: remote.lounge
            activity: "PowerOff"
        icon_template: >-
          {% if is_state_attr('remote.lounge', 'current_activity', 'USB-C Cable') %}
            mdi:cellphone-play
          {% else %}
            mdi:cellphone
          {% endif %}

Yep, I have that setup:

image

My XBox and TV status are just there for now so I can see what’s happening but are just tied to if the Watch TV activity is on they are on. Not the best way but couldn’t find alternatives. TV has no network capabilities at all.

Still continuing to get:

Unable to find referenced entities script.turn_on_watch_tv_activity

Did you figure it out? I’m getting “Unable to find referenced entities” for no reason as well.