Switch Groups - HDMI Inputs

I’m not even sure what terminology to use to summarize the feature I’m trying to find/use.

I have a broadlink rmpro that I am using to change hdmi inputs on my tv - and on an HDMI matrix switch. I’ve created individual switches for HDMI1 through HDMI4 using only the ‘command_on’ attribute.

The problem is that in reality - only 1 of the 4 switches can be “on” at any given time - but using the normal ‘switch’ within Home Assistant - each switch is treated as an independent entity - so if I were to cycle through all 4 switches (manually) - when I’m finished - the state of all 4 switches would show as ‘on’.

Is there an easy (built-in) way to say that these 4 switches are related - and that by turning any 1 of them on - automatically turns ‘off’ all of the others? Obviously, I’d like to do this for the Matrix Switch as well. I would think that this is a common enough scenario that there must be an obvious way to do this that I just haven’t been able to find…

Thanks in advance to any who take the time to reply.

1 Like

Only way I know to do it would be to create automations that would turn off the other switches when the switch you turn on goes to the ‘on’ state.

I also want a nice way to do this. I have done it the automation/trigger way and it is not pretty.

You could make an input select (https://home-assistant.io/components/input_select/) then hide the switches.

Anyone knows how to make a nice switch group for HDMI input with Broadlink RM3? Input select would be nice.

switch:
  - platform: broadlink
    host: 192.168.1.76
    mac: 'B4:43:xx:xx:xx'
    timeout: 15
    switches:
      # Samsung TV:
      # https://github.com/yahat/broadlink_mini_homeassistant_ir_codes_samsung_tv
      samsung_tv:
        friendly_name: "Samsung TV Power"
        command_on: 'JgBGAJKVETkRORA6ERQRFBEUERQRFBE5ETkQOhAVEBUQFREUEBUQOhEUERQRORE5EBURFBA6EBUQOhE5EBUQFRA6EDoRFBEADQUAAA=='
        command_off: 'JgBGAJOVEDoQOhA6DxYPFhAVEBUQFRA6ETkROREUERQRFBEUEBUQFREUERQRORE5EBUQFRE5ETkRORE5ERUQFRA6DzsPFhAADQUAAA=='
      samsung_tv_hdmi1:
        friendly_name: "HDMI1"
        command_on: 'JgBGAJKVETkRORE5ERQQFRAVERQQFRE5ETkROREUERQRFBEUERQRORAVERUPOxAVDzsQOhA6EBUQOhA6EBUQOhAVEBUPFhAADQUAAA=='
      samsung_tv_hdmi2:
        friendly_name: "HDMI2"
        command_on: 'JgBGAJOUETkRORA6ERQQFRAVERQRFBA6ETkROhAVDxYQFQ8WEBUQFQ87EDoRORA6DzsQFRA6DzsPFhAVDxYQFRAVEDoQFRAADQUAAA=='

This works fine, but it is not nice, because HDMI* is not an on/off device.

Hi Madrian,

I would change the friendly name for HDMI 1 to be “HDMI 1 / HDMI 2” and then use the command_on to select HDMI 1 and command_off to select HDMI 2.

It’s still not perfect, but a little better than what you’ve got now… this was an okay compromise for me since I’m the only one who ever uses the UI - and only rarely at that. We mostly use the rm3 commands in automations and with voice commands through integration with HA and Alexa.

1 Like