How to control IR Based LED Strip using Harmony Hub

I just started working with HA assistant and could make the setups for a couple or devices I have on my setup.
I am trying to control this LED Strip using the send command feature, I managed to do this calling the service “send command” from the wed UI. But I think that what would be more useful is to have this light appears as a Light/Switch on the web UI. I guess that I need to do the following:

  1. Have a Logical Light component on the wed UI.
  2. Generate an automation that would use the Send command service to toggle the light on/off.

I need some help adding this “not fisical component”.

Thanks and best regards,

Well you should be able to make a switch pretty easily using template switch, but it would only be on/off.

Can it change colors/brightness with IR commands as well? and are you looking to do that too?

edit: I am sort of thinking now template switch may not help, might just have to do a binary switch. I think this because the state of the light probably isn’t reported in any sensor or similar since its IR based. What this means is if you turn on the light using something other than the switch you make in home assistant, the light will be on but the switch will still be off.

The Strip is an RGB Strip but for now I would like to only start with on/off.
I might try to also control the RGB Feature, but for that I need to get used to HA.
it doe not matter if HA is out of sync regarding the on/off Status on the light I just want to control it from HA. I guess that eventually I could use a DYI Sensor to report the status back, but I get this is way more complicated that what I really need right now.

I did check the template before, but I was not sure it would be useful because I thought templates were only used to group more than one component into only one component in the web UI.

Thanks a lot for the help.

The difference with just a binary sensor and template sensor is template sensor can turn on/off based on the state of a sensor or such. Like, if my tv is on I have a sensor that knows that and it can update the switch to turn on automatically.

But for your problem I would simply have an input boolean (which shows as a switch on front end)

input_boolean:
  light_strip:
    name: Controls LED Light
    initial: off

And then have an automation that is triggered when the input boolean changes value, which will turn on or off the light however it is that you are sending that command:

automation:
  - alias: Turn light strip on or off
    trigger:
      platform: state
      entity_id: input_boolean.light_strip
    action:
      (if it turned on, turn light on, else if it turned off turn the light off)

I am not to sure how specifically you are turning your light on or off thru a service call, but if you want help with the action part lemme know how you are doing that

Below you can check how is that I execute the Service using the web UI.

I have tried to follow the instrucions on the examples, but cannot figure it out.

Thanks a lot for the help.

Even easier if its just a powertoggle command

in the action you simply will have

action:
  - service: remote.send_command
    data:
      entity_id: remote.living
      device: 36112390
      command: "PowerToggle"

If you have specific on/off commands you can do some additional templating to choose whether to turn it on or off with something like:

action:
  - service: remote.send_command
    data_template:
      entity_id: remote.living
      device: 36112390
      command: '{% if is_state("input_boolean.light_strip", "on") %}PowerOn{% else %}PowerOff{% endif %}'

Alternative Simpler Option It may be a better idea just to write a script that toggles the light on and off if you only have a power toggle command. Then it just shows up as a button you press on the dashboard. The script would be very basic

script:
  toggle_light_strip:
    sequence:
      - service: remote.send_command
        data:
          entity_id: remote.living
          device: 36112390
          command: "PowerToggle"

I got it working with the Script.

Having an example that I can actually see at my house made me understand the rest of the examples.

Thanks a lot for the help.

@hertzz Could you post a link to the LED light strip that you are talking about? The ones that I have seen has an RF remote.

The IR controller is this one “SUPERNIGHT IR Remote Controller 44 Keys for RGB LED Light Strip” and the LED Strip is this one “WenTop Led Strip Lights” but I guess that any Chinese LED Strip should work.

I also have an RF Controller with a while LED Strip and I managed to control it following these instructions: https://www.youtube.com/watch?v=5UUazFbK-Hg&t=311s

Hope this helps.

Regards.