How to use Logitech Harmony select with Google Assistant

I’m getting the notice that the Harmony switch platform is being deprecated and I should use the select instead. I use Google Assistant (manually installed, not the Nabu Casa cloud) and currently I just tell it to turn the proper switch on/off like “Turn on the family room watch tv”. I didn’t have to configure anything to get that capability in the google_assistant.yaml. If the switches go away, what would I need to do to be able to control a select box with voice control? Is there a proper way to phrase it, or do I need to add something to the yaml file?

Quick and dirty way would be to create your own ‘switches’ using the input_boolean helper. Create an input_boolean for each device and then create an automation that selects the relevant activity on the harmony device when the input_boolean is ON/True and selects Harmony PowerOff when input_boolean is OFF/False.

You can also add a power off input_boolean & automation if you want a specific off command.

input_boolean:
	family_room_watch_tv:
	  name: "Family Room - Watch TV"
	  initial: off

	family_room_play_console:
	  name: "Family Room - PLay Console"
	  initial: off	  

	family_room_power_off:
	  name: "Family Room - Power Off"
	  initial: off

automation:
	id: tv_controller
	alias: Turn on Family Room TV
	description: Turn family room TV on or off using input_booleans
	mode: single
	trigger:
	  - platform: state
	    entity_id: input_boolean.family_room_watch_tv
	    id: family_tv-on
	    from: "off"
	    to: "on"
	  - platform: state
	    entity_id: input_boolean.family_room_watch_tv
	    id: family_tv-off
	    from: "on"
	    to: "off"
	condition: []
	action:
	  - choose:
	      - conditions:
	          - condition: trigger
	            id: family_tv-on
	        sequence:
	          - service: select.select_option
				target:
	  				entity_id: select.family_room_activities
				data:
	  				option: Watch Tv
	      - conditions:
	          - condition: trigger
	            id: family_tv-off
	        sequence:
	          - service: select.select_option
				target:
	  				entity_id: select.family_room_activities
				data:
	  				option: PowerOff

Add extra automations for other activities and devices.

You’ll need to be careful that the switches don’t get out of sync - say you turn on the WatchTV with 1 input_boolean and then turn it off using a different PowerOFF one. Could end up with the WatchTV boolean still saying that it’s On/True even though the TV is off.

Tie the Google side of things to the new input_booleans, so when you say “Turn on the family room watch tv” it turns on the input_boolean.family_room_watch_tv.

I’m sure more experienced members can add more sophisticated or cleaner solutions.

Edit: Changed lounge_activities in automation to family_room_activities for consistency

So as it turns out, you can get the select for the harmony remotes into google home and they work well if you are selecting from the app or a nest screen, but voice is a little sketchy. I added my harmony remote selects to my google_assistant.yaml and gave one the alias “Family Room Remote”.

Based on another thread I saw here about voice control of a select item, if I say “Set the Family Room Remote MODE to Watch TV”, that actually works and it turns on the watch tv activity. From what I read, the “MODE” keyword is really necessary for it to work at all. But when I try to use any of the other activities, including “Power Off”, it just gives me an error message. If you are in the app or on a nest screen, it gives you a nice selection of the options where you can easily choose the one you want. Just seems voice control is kind of flaky.

It seems way too finicky, so I will probably still have to use something like what you suggest to create the input_booleans for the various activities. The harmony switches always worked well for me. I’m sad to see them go :unamused:

Hi,

I’m facing a similar issue with HomeKit and Alexa where I also need the switches. I therefor noted all the entity names and wanted to create Template switches. I used to do this before the switches were introduced by the integration, and still don’t really get why we are going back a step and have to make workarounds in YAML.

What I wanted to do is, upgrading to 2024.6.0 and then create the template switches, so the entity names are available as I thought they might get deleted with Upgrade. What I’ve now noticed is that the switch entities are still there and also shown under the Harmony integration. I also couldn’t find any changes mentioned in the release notes about the change anymore. Did they only forget it with this release or did we actually get rid of this, in my opinion, totally unnecessary change?

Anyone experienced the same?

Regards
Stefan

It appears they haven’t removed the switches yet in 2024.6. I just went through all the release notes for 6.1 and 6.2 and there’s no mention of the harmony changes. It could still come in a later June release though. I’ve implemented this now by created the input_booleans for each activity on each of my two harmony remotes. I then created a script to handle actually setting the harmony based on the remote and the activity being passed into it. Then I have two automations. One will detect the state changes on the input_selects and set things properly on the harmony. The other automation detects outside changes to the harmony remotes and syncs the input_selects appropriately. So, I appear to be ready when they do finally remove the switches.