Deprecated Harmony entity detected in script.theater_mode_off

You have to post your entire configuration. Because as it stands the switches (Outside all of your other stuff) behave this way:

if you turn on switch 1, all other switches will show as off. If you turn on switch 2, switch 2 will execute and switch 1 will naturally turn off without performing the turn off command.

So there’s something in your setup that’s causing that functionality to behave differently.

Use the template switches outside the interface you created above and you’ll see they behave correctly.

Upon further review…only the appletv button works. I cannot see any difference from the template entry to the call in the switches. I cannot start the system or change any inputs by calling any other switch.

However if I select the Activity on the remote, the appropriate button indicates the correct activity. (turns on and green).

I am sure I have something set wrong, but have no idea what.

the first code is the entire configuration.yaml
the second is a snippet of the appdaemon code that should call those switches from the template in the configuration.yaml


For test completness…

I created a duplicate alternate page with scripts that run the same activity commands as the current Harmony integration recommends and do not use the switches created by the template…they work fine. (well they operate as they should…but the icons don’t show as being active…but that is something in my script config somewhere)

Summary, my scripts work but don’t indicate activity…the template switches only appletv works, and they do indicate activity correctly.


# Configure a default setup of Home Assistant (frontend, api, etc)
default_config:

# Text to speech
tts:
  - platform: google_translate

stream:
ffmpeg:
group: !include groups.yaml
# switch: !include switch.yaml
automation: !include automations.yaml
remote: !include remote.yaml
script: !include scripts.yaml
scene: !include scenes.yaml
camera: !include camera.yaml
# for streaming radio stations
# input_number: !include input_number.yaml
# input_select: !include input_select.yaml

lovelace:
  resources:
    - url: /local/mini-media-player-bundle.js?v=1.16.4
      type: module

#  entry for Pioneer VSX1021
media_player:
  - platform: pioneer
    host: 192.168.      
    name: Pioneer Receiver
    port: 8102
    sources:
      'Phono': '00'
      'CD': '01'
      'Tuner': '02'
      'CD-R/Tape': '03'
      'DVD': '04'
      'TV/Sat': '05'
      'Video 1': '10'
      'Multi Channel In': '12'
      'Video 2': '14'
      'DVR/BDR': '15'
      'iPod/USB': '17'
      'XM Radio': '18'
      'HDMI 1': '19'
      'HDMI 2': '20'
      'HDMI 3': '21'
      'HDMI 4': '22'
      'HDMI 5': '23'
      'Blu-Ray': '25'
      'Home Media Gallery (Internet Radio)': '26'
      'Sirius': '27'
      'Adapter Port': '33'  
   
   
logger:
  default: warning

switch:
  - platform: template
    switches:
      ### hub LaserDisc Harmony Activty ###

      hub_laserdisc:
        unique_id: harmony-activity-hub-laserdisc
        friendly_name: hub LaserDisc
        value_template: >
          {{ is_state_attr('remote.hub', 'current_activity', 'LaserDisc') }}
        turn_on:
          service: remote.turn_on
          target:
            entity_id: remote.hub
          data:
            activity: LaserDisc
        turn_off:
          service: remote.turn_on
          target:
            entity_id: remote.hub
          data:
            activity: PowerOff
  
      ### hub Lights out Harmony Activty ###

      hub_lights_out:
        unique_id: harmony-activity-hub-lights_out
        friendly_name: hub Lights out
        value_template: >
          {{ is_state_attr('remote.hub', 'current_activity', 'Lights out') }}
        turn_on:
          service: remote.turn_on
          target:
            entity_id: remote.hub
          data:
            activity: Lights out
        turn_off:
          service: remote.turn_on
          target:
            entity_id: remote.hub
          data:
            activity: PowerOff
  
      ### hub Plug Power Toggle Harmony Activty ###

      hub_plug_power_toggle:
        unique_id: harmony-activity-hub-plug_power_toggle
        friendly_name: hub Plug Power Toggle
        value_template: >
          {{ is_state_attr('remote.hub', 'current_activity', 'Plug Power Toggle') }}
        turn_on:
          service: remote.turn_on
          target:
            entity_id: remote.hub
          data:
            activity: Plug Power Toggle
        turn_off:
          service: remote.turn_on
          target:
            entity_id: remote.hub
          data:
            activity: PowerOff
  
      ### hub Bluray Harmony Activty ###

      hub_bluray:
        unique_id: harmony-activity-hub-bluray
        friendly_name: hub Bluray
        value_template: >
          {{ is_state_attr('remote.hub', 'current_activity', 'Bluray') }}
        turn_on:
          service: remote.turn_on
          target:
            entity_id: remote.hub
          data:
            activity: Bluray
        turn_off:
          service: remote.turn_on
          target:
            entity_id: remote.hub
          data:
            activity: PowerOff
      ### hub theaterpower Harmony Activty ###

      hub_theaterpower:
        unique_id: harmony-activity-hub-bluray
        friendly_name: hub Bluray
        value_template: >
          {{ is_state_attr('remote.hub', 'current_activity', 'Bluray') }}
        turn_on:
          service: remote.turn_on
          target:
            entity_id: remote.hub
          data:
            activity: Bluray
        turn_off:
          service: remote.turn_on
          target:
            entity_id: remote.hub
          data:
            activity: PowerOff  
            
      ### hub Receiver Power Harmony Activty ###

      hub_receiver_power:
        unique_id: harmony-activity-hub-receiver_power
        friendly_name: hub Receiver Power
        value_template: >
          {{ is_state_attr('remote.hub', 'current_activity', 'Receiver Power') }}
        turn_on:
          service: remote.turn_on
          target:
            entity_id: remote.hub
          data:
            activity: Receiver Power
        turn_off:
          service: remote.turn_on
          target:
            entity_id: remote.hub
          data:
            activity: PowerOff
  
      ### hub XBMC Harmony Activty ###

      hub_xbmc:
        unique_id: harmony-activity-hub-xbmc
        friendly_name: hub XBMC
        value_template: >
          {{ is_state_attr('remote.hub', 'current_activity', 'XBMC') }}
        turn_on:
          service: remote.turn_on
          target:
            entity_id: remote.hub
          data:
            activity: XBMC
        turn_off:
          service: remote.turn_on
          target:
            entity_id: remote.hub
          data:
            activity: PowerOff
  
      ### hub Popcorn-Equipment Harmony Activty ###

      hub_popcorn_equipment:
        unique_id: harmony-activity-hub-popcorn_equipment
        friendly_name: hub Popcorn-Equipment
        value_template: >
          {{ is_state_attr('remote.hub', 'current_activity', 'Popcorn-Equipment') }}
        turn_on:
          service: remote.turn_on
          target:
            entity_id: remote.hub
          data:
            activity: Popcorn-Equipment
        turn_off:
          service: remote.turn_on
          target:
            entity_id: remote.hub
          data:
            activity: PowerOff
  
      ### hub DVD Changer Harmony Activty ###

      hub_dvd_changer:
        unique_id: harmony-activity-hub-dvd_changer
        friendly_name: hub DVD Changer
        value_template: >
          {{ is_state_attr('remote.hub', 'current_activity', 'DVD Changer') }}
        turn_on:
          service: remote.turn_on
          target:
            entity_id: remote.hub
          data:
            activity: DVD Changer
        turn_off:
          service: remote.turn_on
          target:
            entity_id: remote.hub
          data:
            activity: PowerOff
  
      ### hub House Lights Dim Harmony Activty ###

      hub_house_lights_dim:
        unique_id: harmony-activity-hub-house_lights_dim
        friendly_name: hub House Lights Dim
        value_template: >
          {{ is_state_attr('remote.hub', 'current_activity', 'House Lights Dim') }}
        turn_on:
          service: remote.turn_on
          target:
            entity_id: remote.hub
          data:
            activity: House Lights Dim
        turn_off:
          service: remote.turn_on
          target:
            entity_id: remote.hub
          data:
            activity: PowerOff
  
      ### hub AppleTV Harmony Activty ###

      hub_appletv:
        unique_id: harmony-activity-hub-appletv
        friendly_name: hub AppleTV
        value_template: >
          {{ is_state_attr('remote.hub', 'current_activity', 'AppleTV') }}
        turn_on:
          service: remote.turn_on
          target:
            entity_id: remote.hub
          data:
            activity: AppleTV
        turn_off:
          service: remote.turn_on
          target:
            entity_id: remote.hub
          data:
            activity: PowerOff
  
      ### hub Dish Network Harmony Activty ###

      hub_dish_network:
        unique_id: harmony-activity-hub-dish_network
        friendly_name: hub Dish Network
        value_template: >
          {{ is_state_attr('remote.hub', 'current_activity', 'Dish Network') }}
        turn_on:
          service: remote.turn_on
          target:
            entity_id: remote.hub
          data:
            activity: Dish Network
        turn_off:
          service: remote.turn_on
          target:
            entity_id: remote.hub
          data:
            activity: PowerOff
  
      ### hub Kodi Harmony Activty ###

      hub_kodi:
        unique_id: harmony-activity-hub-kodi
        friendly_name: hub Kodi
        value_template: >
          {{ is_state_attr('remote.hub', 'current_activity', 'Kodi') }}
        turn_on:
          service: remote.turn_on
          target:
            entity_id: remote.hub
          data:
            activity: Kodi
        turn_off:
          service: remote.turn_on
          target:
            entity_id: remote.hub
          data:
            activity: PowerOff
  
      ### hub House Lights Up Harmony Activty ###

      hub_house_lights_up:
        unique_id: harmony-activity-hub-house_lights_up
        friendly_name: hub House Lights Up
        value_template: >
          {{ is_state_attr('remote.hub', 'current_activity', 'House Lights Up') }}
        turn_on:
          service: remote.turn_on
          target:
            entity_id: remote.hub
          data:
            activity: House Lights Up
        turn_off:
          service: remote.turn_on
          target:
            entity_id: remote.hub
          data:
            activity: PowerOff
  
      ### hub Roku Harmony Activty ###

      hub_roku:
        unique_id: harmony-activity-hub-roku
        friendly_name: hub Roku
        value_template: >
          {{ is_state_attr('remote.hub', 'current_activity', 'Roku') }}
        turn_on:
          service: remote.turn_on
          target:
            entity_id: remote.hub
          data:
            activity: Roku
        turn_off:
          service: remote.turn_on
          target:
            entity_id: remote.hub
          data:
            activity: PowerOff

These are my appdaemon entries for the above Activities.

bluraya_scene:
    widget_type: switch
    title: Watch
    title2: Bluray
    entity: switch.hub_bluray
    icon_on: mdi-movie-roll
    icon_off: mdi-movie-roll
laserdisca_scene:
    widget_type: switch
    title: Watch
    title2: Laserdisc
    entity: switch.hub_laserdisc
    icon_on: mdi-movie
    icon_off: mdi-movie
DVDa_scene:
    widget_type: switch
    title: Watch
    title2: DVD
    entity: switch.hub_dvd_changer
    icon_on: mdi-movie-roll
    icon_off: mdi-movie-roll 
disha_scene:
    widget_type: switch
    title: Watch
    title2: Dish Network
    entity: switch.hub_dish_network
    icon_on: mdi-satellite-uplink
    icon_off: mdi-satellite-uplink   
applea_scene:
    widget_type: switch
    title: Watch
    title2: AppleTV
    entity: switch.hub_appletv
    icon_on: mdi-apple
    icon_off: mdi-apple
kodia_scene:
    widget_type: switch
    title: Watch
    title2: Kodi Media
    entity: switch.hub_kodi
    icon_on: mdi-play-network
    icon_off: mdi-play-network   
rokua_scene:
    widget_type: switch
    title: Watch
    title2: Roku Media
    entity: switch.hub_roku
    icon_on: mdi-play-network
    icon_off: mdi-play-network

OMG…sometimes…

So digging through the logs I see the normal oddballs, (can’t connect to a device that is not turned on etc)

And I see this one…

Logger: homeassistant.components.switch
Source: helpers/entity_platform.py:764
integration: Switch (documentation, issues)
First occurred: 12:11:40 PM (1 occurrences)
Last logged: 12:11:40 PM

Platform template does not generate unique IDs. ID harmony-activity-hub-bluray is already used by switch.hub_bluray_2 - ignoring switch.hub_theaterpowera

So apparently the template generator created items that already existed somewhere else in HA…I will have to find them, but anyway I renamed ALL the hub_ ones on the template, and of course then my appdaemon buttons…

…works perfectly.

So I figured it was something in my system, thanks again Petro!

Mic

Final post on this subject.

Way back when, the Logitech Harmony integration created a bunch of entities based on activities etc.

Petro’s template generator creates switches with the same names.

So first I you still have all those auto generated entities from the Harmony integration…you need to delete all of them except for the two hub ones…(you can tell which ones to delete because their info will say not supported by the integration.)

Because I did not do that, I had to jump through hoops and rename everything to make it all work.

Mic

1 Like