I have confirmed that the entity_id and device is right.
The remote.turn_on is working fine with my activities.
The led on the hub is not blinking when i trigger the action.
I think the config examples in this forum is very confusing. Some are using quotes around the device and command values and some use data: instead of data_template:. I have also seen examples where the entity_id is directly under the service line and not under data:
So an working example in the documentation would be helpful for all of us using the remote.
The variations you mention are all valid syntax. There are many ways to do the same thing and HA is flexible in places. âdata_templateâ would be required if you were passing any templated data, which youâre not, but itâll still work.
Iâd experiment with the services dev tab to see if you can get things working. The service will want JSON, so youâll send it something like:
Yes, this is doing the same thing as your action, but itâll let you test settings combinations. If itâs not working in the dev tool, it definitely wonât work in an action.
I found the source to my problems.
When i added the device in myHarmony i manualy teached the remote the on and off command.
I named the commands âPower Onâ and âPower Offâ. That worked when i used the remote, but not from the API.
I removed the device and added it again but now i named the comands âPowerOnâ and âPowerOffâ. Now everything work fine.
So naming the commands without spacing is required.
That is activities and that is working fine with spaces even for me.
When i had spaces in my commands they show upp without spaces in the .conf file.
I guess that messed up everything.
Hi,
Just in case anyone else has similar struggles with send_command.
Iâve just spent hours trying to find out why I could not get this to work, and
turns out my problem was also with how I named the command when I taught it to Harmony.
I called the harmony command ON and also tried On.
This command would work through the dev interface
{âentity_idâ:âremote.living_roomâ,âdeviceâ:â42178528â,âcommandâ:âOnâ}
But I could never get it to work as an action no matter what I tried
Changed it to PowerOn vola it works.
You have to fetch the command names and the device ids from harmony_[name].conf file created by HASS. Also donât put the command name in additional quotes.