HDMI-CEC setup - Help needed

Hi all,

I am relatively new to HA (started the whole thing 5 days ago) so please bear with me :slight_smile:

I have setup almost everything I have at home with HA and my rasp3.

I would like now to setup commands for the Hisense TV (no Android) connected to the rasp by HDMI.
I have activated the HDMI-CEC on the TV and I am trying to have some working commands in my lovelace.

This is what I have in my configuration.yaml

    hdmi_cec.hdmi_0: media_player  

After rebooting the system, I got a media player entity called Vizio TV (media_player.hdmi_0) and a TV 3 () (switch.hdmi_3) that I think is the decoder I have connected to the TV on HDMI port 3 (ports 1 and 4 are empty and port 2 is where the rasp is connected).

I can turn on and off the TV by adding the Vizio TV entity in lovelace using a default card, while the switch appearing doing the same for the TV3 () one doesn’t do anything (I don’t really need it as I can fully control my Decoder VU Zero 4k by the Enigma2 integration already).

Also, every time I restart Hassio, the TV input is switched to the rasp one automatically.

Now my questions are:

  • Why my Hisense h65m5500 is appearing as Vizio TV?
  • How can I add other commands like select_input, volume up/down?
  • Finally, how can I integrate them in a lovelace card?

Thanks a lot in advance for yor help!

Because Vizio is OEM vendor…Vizio made it and put hisense name on it possibly. This info come from device

Look at HA UI>>developer tools>>“services” tab
You can look at available services to see what is available.

Lovelace buttons can call HA services

Also, devices like ROKU and AV receivers have their own integrations. ROKU will control connected HDMI devices using CEC(HA integration not needed).
I have Roku
I have recover
I have projector
All connect by HDMI. Volume up on roku cause volume up on receiver. Power OFF/ON roku powers OFF/ON receiver+projector also. Your items my differ but idea is this may enhance your setup
Depending on your setup it may be easier to use the native integration of another device to control a secondary device using CEC(natively, not HA integration)


Hi @tmjpugh,

Thanks a lot for taking the time to answer me :slight_smile:

I tried again to have this working but no luck.

All clear!

Unfortunately I am still lacking the knowledge to understand how I should link the entity + services etc to generate what I need. I searched for a configuration template on internet to mimic and edit with my info but it seems not so many people are using the hdmi-cec (or it is so easy to use nobody needed to ask about it, :frowning: )

I don’t have other devices than the TV, the rasp connected to it (which video out I really don’t need, it is connected only to take advantage of its hdmi-cec capabilities) and the decoder connected to the TV (that I don’t need to control by hdmi-cec as I’m using the Enigma2 integration for it and it’s working perfectly).


Have you tried using UI>>developer tools>>services?
It shows examples. Also the link I previously provided showed some available services for HDMI CEC. I not use this integration anymore but I try to provide some example later

Hi @tmjpugh,

Thank you once again for your help on this.
I indeed tried the dev tools > services but not really sure what service to use (I tried media_player as it is the one my tv is recognized with, but could not find the select source one, for example).

I will dig a bit more there though.

Thanks again!

Hi again,

I tried to create an automation for this but it is not working and I do not understand why.

This is the code:

- id: '1606258611337'
  alias: input
  description: ''
  - platform: state
    entity_id: media_player.hdmi_0
    from: 'Off'
    to: 'On'
  condition: []
  - service: media_player.turn_on
      entity_id: media_player.vuzero_4k
  - service: hdmi_cec.select_device
  mode: single

My TV entity is media_player.hdmi_0, my decoder entity is media_player.vuzero_4k and the decoder is on HDMI3.
When I set my tv to hdmi2, turn it off and then on, my decoder does not turn on and the tv does not switch to HDMI3.

Can’t understand why…

Thank you in advance for the help!