Lovelace: Card Controle Remoto TV Samsung

Olá, nesse tutorial compartilho como criar um card com as principais funções de controle remoto da TV Samsung usando a integração media player (sem usar comandos IR).

O card fica assim:

1) Adicione o repositório personalizado no HACS.

Antes de criar o card é necessário adicionar o custom card TV Card.

2) Adicionando o card no lovelace:

Agora já é possível criar o card, o código abaixo contém todos os botões disponíveis no custom card:

type: 'custom:tv-card'
entity: media_player.tv_quarto
name: TV Quarto
tv: true
power:
  service: media_player.play_media
  service_data:
    entity_id: media_player.tv_quarto
    media_content_id: KEY_POWER
    media_content_type: send_key
back:
  service: media_player.play_media
  service_data:
    entity_id: media_player.tv_quarto
    media_content_id: KEY_RETURN
    media_content_type: send_key
source:
  service: media_player.play_media
  service_data:
    entity_id: media_player.tv_quarto
    media_content_id: KEY_SOURCE
    media_content_type: send_key
home:
  service: media_player.play_media
  service_data:
    entity_id: media_player.tv_quarto
    media_content_id: KEY_HOME
    media_content_type: send_key
channelup:
  service: media_player.play_media
  service_data:
    entity_id: media_player.tv_quarto
    media_content_id: KEY_CHUP
    media_content_type: send_key
info:
  service: media_player.play_media
  service_data:
    entity_id: media_player.tv_quarto
    media_content_id: KEY_INFO
    media_content_type: send_key
channeldown:
  service: media_player.play_media
  service_data:
    entity_id: media_player.tv_quarto
    media_content_id: KEY_CHUP
    media_content_type: send_key
up:
  service: media_player.play_media
  service_data:
    entity_id: media_player.tv_quarto
    media_content_id: KEY_UP
    media_content_type: send_key
left:
  service: media_player.play_media
  service_data:
    entity_id: media_player.tv_quarto
    media_content_id: KEY_LEFT
    media_content_type: send_key
select:
  service: media_player.play_media
  service_data:
    entity_id: media_player.tv_quarto
    media_content_id: KEY_ENTER
    media_content_type: send_key
right:
  service: media_player.play_media
  service_data:
    entity_id: media_player.tv_quarto
    media_content_id: KEY_RIGHT
    media_content_type: send_key
down:
  service: media_player.play_media
  service_data:
    entity_id: media_player.tv_quarto
    media_content_id: KEY_DOWN
    media_content_type: send_key
reverse:
  service: media_player.play_media
  service_data:
    entity_id: media_player.tv_quarto
    media_content_id: KEY_REWIND
    media_content_type: send_key
play:
  service: media_player.play_media
  service_data:
    entity_id: media_player.tv_quarto
    media_content_id: KEY_PLAY
    media_content_type: send_key
forward:
  service: media_player.play_media
  service_data:
    entity_id: media_player.tv_quarto
    media_content_id: KEY_FF
    media_content_type: send_key
volume_mute:
  service: media_player.play_media
  service_data:
    entity_id: media_player.tv_quarto
    media_content_id: KEY_MUTE
    media_content_type: send_key
volume_up:
  service: media_player.play_media
  service_data:
    entity_id: media_player.tv_quarto
    media_content_id: KEY_VOLUP
    media_content_type: send_key
volume_down:
  service: media_player.play_media
  service_data:
    entity_id: media_player.tv_quarto
    media_content_id: KEY_VOLDOWN
    media_content_type: send_key
netflix:
  service: media_player.select_source
  service_data:
    entity_id: media_player.tv_quarto
    source: Netflix
prime_video:
  service: media_player.select_source
  service_data:
    entity_id: media_player.tv_quarto
    source: Prime Video
youtube:
  service: media_player.select_source
  service_data:
    entity_id: media_player.tv_quarto
    source: YouTube

O card pode ser usado para comandos via IR, para isso basta alterar os dados do service usando os dados do comando, segue exemplo usando broadlink:

      power:
        service: broadlink.send
        service_data:
          host: 192.168.1.53
          packet: >- JgBGAJOWEjcSOBI3EhMTEhITEhMSExI4ETgSOBEUERQRFBEUERQRFBI3EhMSFBETEhMSExMSEjgSExE4EzcRORI3ETkROBIADQUAAA==
3 Likes