I’d like to create a card that has individual buttons for each of the different Activities.
I’m having difficulty accomplishing this however.
Looking at the integration documentation, Logitech Harmony Hub - Home Assistant it seems simple to make a button that would be linked to the action “remote.turn_on” with data:activity:“The named activity”
However, in all my scripting “remote.turn_on” is not recognized as a valid action.
You don’t state where you are trying your scripting so…
Have you tried going to developer tools and actions and firstly checking you have “remote.turn_on” and “remote.turn_off” options and if so trying from there to run the actions?
remote.turn_on/off is the correct action and should work.
I ended up replacing the recently removed harmony activity switches with my own template switches to replicate the original switches and these all call the remote.turn_on/off action.
There should be no reason that a front end GUi button could not be used to achieve this action also.
Let us know if you can call the action via developer tools and if so maybe post up the yaml that you are trying that does not work.
Thank you for that example. Looks like I neglected to add the necessary “perform_action” line.
Is there a way to keep a button highlighted based on if it was the last selected activity?
(ala the pull down selector on the native integration stays on the last selected activity).
EDIT:
I made an interactive glance card for my activities. I believe I have to use action scripts as the entities for the glance card because glance cards cannot display actions as the icons?
Not sure about making the icons stay lit up, I am sure there may be some fancy way of doing it by maybe referencing the background select’s state but I opted for simple template switches that activate and show what activity is running, so switching on a different activity will force the current activities switch to off as only one activity can be present at once.
The harmony integration used to have switches as well as a select, however for some unknown reason the switches were removed. These switches were exposed to voice assistants to voice activate harmony activities. However most voice assistants can’t use the select entity so voice control no longer as easy to achieve.
The answer was simply to replace the original switches with template switches like this:
Simply make a template switch for each activity as above. Then you can place those switches on your dashboard and display them as you please.
Only one switch can be on at a time so when you want to switch the current activity off simply switch the switch off, or if you want to change to a different activity simply turn the new activity switch on and you will note that the previous/current activity switch will automatically toggle off.