Universal Remote Card - Buttons, Touchpads, Sliders, and Keyboards for Multiple Platforms

What have you tried so far? You don’t need to get the path with Illustrator.

i want to have those 2 logos in the Remote card. and I tried to find a way to get the path for them.
but without sucess.
is there any other way i could add it to HA and use it as an icon?

i want to have those 2 logos in the Remote card. and I tried to find a way to get the path for them.
but without sucess.
is there any other way i could add it to HA and use it as an icon?

It’s pretty easy:

  1. Install GitHub - thomasloven/hass-fontawesome: 🔹 Use icons from fontawesome in home-assistant (read the docs about custom svg)…
  2. Copy the .svg icon to config/custom_icons directory
  3. Use a custom action for the button, specifying the icon as below.
- name: custom2
  type: button
  tap_action:
    ...
  icon: fapro:plex-test2#fullcolor

And voila:

1 Like

so I installed fontawesome and created the custom_icons folder (i home in the right directory).
i added my svg file it is now saves without the .svg extention.
and created a custom button, but i still dont see the icon.
Screenshot 2024-11-12 194212
Screenshot 2024-11-12 193745
Screenshot 2024-11-12 193738

  1. custom_icons is in the config directory
  2. don’t forget the #fullcolor at the end of the icon.
  3. test with a standfard fapro icon

Google TV question for you folk.

I have a Hisense UST Projector with built in Google TV.

I have the Android Debug Bridge integration which creates a remote and media player.

I also have the Android TV Remote integration which creates another remote and media player.

With Universal Remote Card, which ones do you use (should I use)?

My crude understanding is that the ADB devices are well featured (full app list) but slow (adb is slow)…while the Android TV Remote is less featured - but faster? But I could be dead wrong and their might be an even better approach - that I don’t know.

Thoughts?

Per the README, use the Android TV Remote integration remote ID for remote ID, and the ADB integration remote ID for the keyboard ID.

Thanks for this great contribution!

Color of buttons by state seems to no longer be working, whereas it had been before the breaking updates (e.g., change the power button to yellow color when on). What am I doing wrong? Thank you.

type: custom:android-tv-card
remote_id: remote.family_room_tv
media_player_id: media_player.family_room_tv_2
title: Family Room TV
rows:
  - - power
    - menu
  - - channel_up
    - info
    - channel_down
  - - navigation_buttons
  - - back
    - home
    - tv
  - - rewind
    - play
    - pause
    - fast_forward
  - - volume_buttons
  - - slider
  - - hulu
    - netflix
    - youtube
    - primevideo
custom_actions:
  - type: button
    name: power
    tap_action:
      action: key
      key: POWER
    icon: mdi:power
    styles: |-
      :host {
        color: {% if is_state("remote.family_room_tv", "on") %}
      #FFC107
      {% endif %}
      ;
      }
  - tap_action:
      action: perform-action
      data:
        activity: market://launch?id=com.hulu.livingroomplus
      target:
        entity_id: remote.family_room_tv
      perform_action: remote.turn_on
    icon: mdi:hulu
    name: hulu
    type: button
    styles: |-
      :host {
        color: {% if is_state("sensor.media_source", "Hulu") %}
      #FFC107
      {% endif %}
      ;
      }
  - type: button
    name: netflix
    tap_action:
      action: source
      source: netflix://
    icon: mdi:netflix
    styles: |-
      :host {
        color: {% if is_state("sensor.media_source", "Netflix") %}
      #FFC107
      {% endif %}
      ;
      }
  - type: button
    name: youtube
    tap_action:
      action: source
      source: vnd.youtube://
    icon: mdi:youtube
    styles: |-
      :host {
        color: {% if is_state("sensor.media_source", "YouTube") %}
      #FFC107
      {% endif %}
      ;
      }
  - type: button
    name: primevideo
    tap_action:
      action: source
      source: https://app.primevideo.com
    icon: primevideo
    styles: |-
      :host {
        color: {% if is_state("sensor.media_source", "Prime") %}
      #FFC107
      {% endif %}
      ;
      }
  - type: button
    name: tv
    tap_action:
      action: key
      key: TV
    icon: mdi:television-box
    styles: |-
      :host {
        color: {% if is_state("sensor.media_source", "Cast") %}
      #FFC107
      {% endif %}
      ;
      }
  - type: button
    name: home
    tap_action:
      action: key
      key: HOME
    icon: mdi:home
    styles: |-
      :host {
        color: {% if is_state("sensor.media_source", "Launcher") %}
      #FFC107
      {% endif %}
      ;
      }
visibility:
  - condition: state
    entity: remote.family_room_tv
    state: "on"
styles: |-
  .row {
    color: #44739E;
  }

The v3 to v4 config upgrade process wasn’t perfect and some templates would break due to the change in styles format. Try modifying your CSS styles templates to wrap the entire variable and use the icon class selector like so:

.icon {
    {% if is_state("remote.family_room_tv", "on") %}
    color: #FFC107;
    {% endif %}
}
1 Like

That worked! Thanks-

First of all, love this card!

A different colour related question. I have a card set up with various actions for my LG TV, with coloured icons. All working well on iOS devices and desktops:

However the exact same card on my Fire tablet in Fully Kiosk doesn’t render the colours for some reason. Apologies for poor quality photo:

Is this just a limitation of Fully Kiosk, or has anyone else seen and/or fixed the same issue with a setting change?

The CSS seems OK, this is for the YouTube action for example:

      :host {
          --icon-color: rgb(229, 9, 20);
      }
1 Like

I have a dashboard with four different views. The first view is for selecting between TV, Apple TV, Blu-ray, and PS5. The other views are for controlling each of these different components. Each view is a universal remote. Is there a way to add a navigation action, such that after pressing, for example, the apple TV button, it is powered on, and I am immediately transferred to the apple tv controller view?

I have this set up by just using the sections view, then in each remote card section, set the visibility to be dependent on the input selected.

For example set the visibility of the Apple TV card for entity state of your input to be Apple TV etc etc and you should then only ever see one remote card (that of your input).

1 Like

Very interesting! Do you know of any examples of how to do this, or would you be amenable to posting a sample?

Its pretty straight forward. I put each remote card as its own section on the dashboard. Then for each of those sections I configured the section visibility, which you can do in the visual editor, no need to tinker with the yaml.

For example in my case, the Apple TV remote card will only show if it is switched on, configured as below in the UI. The Apple TV can report “on”, “idle”, “paused” and a few other states when it is on, so I configured the card to show when it was not “off” or “standby”.

Your setup will be different to mine, so just play around with these until you get your desired result. Good luck :grinning:

2 Likes

Screenshot 2024-11-27 171916

While that change in CSS styles template worked for changing the color of a button corresponding to state for an Android TV, it did not work for a Samsung TV. Any suggestions for where I went wrong? Thanks again!

type: custom:android-tv-card
remote_id: remote.samsung_tv_22
media_player_id: media_player.samsung_tv_22
autofill_entity_id: true
title: Samsung TV
custom_actions:
  - type: button
    name: up
    tap_action:
      action: key
      key: KEY_UP
    hold_action:
      action: repeat
    icon: mdi:chevron-up
  - type: button
    name: down
    tap_action:
      action: key
      key: KEY_DOWN
    hold_action:
      action: repeat
    icon: mdi:chevron-down
  - type: button
    name: left
    tap_action:
      action: key
      key: KEY_LEFT
    hold_action:
      action: repeat
    icon: mdi:chevron-left
  - type: button
    name: right
    tap_action:
      action: key
      key: KEY_RIGHT
    hold_action:
      action: repeat
    icon: mdi:chevron-right
  - type: button
    name: center
    tap_action:
      action: key
      key: KEY_ENTER
    icon: mdi:checkbox-blank-circle
    double_tap_action:
      action: key
      key: KEY_RETURN
  - type: button
    name: power
    tap_action:
      action: perform-action
      target:
        entity_id: switch.samsung_tv
      perform_action: switch.toggle
    icon: mdi:power
  - type: button
    name: home
    tap_action:
      action: key
      key: KEY_HOME
    icon: mdi:home
  - type: button
    name: back
    tap_action:
      action: key
      key: KEY_RETURN
    icon: mdi:keyboard-backspace
  - type: button
    name: volume_mute
    tap_action:
      action: key
      key: KEY_MUTE
    icon: mdi:volume-low
  - icon: mdi:arrow-up-bold
    tap_action:
      action: key
      key: KEY_CHUP
    name: ch_up
    type: button
  - icon: mdi:arrow-down-bold
    tap_action:
      action: key
      key: KEY_CHDOWN
    name: ch_down
    type: button
  - type: button
    name: power
    tap_action:
      action: perform-action
      target:
        entity_id: switch.samsung_tv
      perform_action: switch.toggle
    icon: mdi:power
    styles: |-
      .icon {
          {% if is_state("switch.samsung_tv", "on") %}
          color: #FFC107;
          {% endif %}
      }
  - type: button
    name: volume_mute
    tap_action:
      action: perform-action
      target:
        entity_id: switch.samsung_tv
      perform_action: script.samsung_tv_mute_toggle
    icon: >-
      {{ iif(is_state("sensor.mute_lr", "True"), "mdi:volume-variant-off",
      "mdi:volume-low") }}
    styles: |-
      .icon {
          {% if is_state("sensor.mute_lr", "True") %}
          color: #FFC107
          {% endif %}
      }
  - tap_action:
      action: perform-action
      data:
        source: Amazon Fire TV stick
      target:
        entity_id: media_player.samsung_tv_22
      perform_action: media_player.select_source
    icon: mdi:video-input-hdmi
    name: fire
    type: button
    styles: |-
      .icon {
          {% if is_state("sensor.tuner", "Amazon Fire TV stick") %}
          color: #FFC107
          {% endif %}
      }
  - tap_action:
      action: perform-action
      data:
        source: TV
      target:
        entity_id: media_player.samsung_tv_22
      perform_action: media_player.select_source
    icon: mdi:television-classic
    name: sammy
    type: button
    styles: |-
      .icon {
          {% if is_state("sensor.tuner", "TV/HDMI") %}
        color: #FFC107
        {% elif is_state("sensor.tuner", "TV") %}
        color: #FFC107          
      {% endif %}
      }
rows:
  - - power
    - null
    - volume_mute
  - - ch_up
    - ch_down
  - - navigation_buttons
  - - back
    - home
  - - slider
  - - fire
    - sammy
styles: |-
  .row {
    color: #44739E;
  }

LG webOS TV users!

I’ve added keyboard support for this platform to the 4.3.0 beta, but I do not have an LG webOS TV to actually test this on. I could really use help from users to validate that my LG webOS TV keyboard support implementation is working correctly!

Version 4.3.0 has been released! It’s got a few big features:

  • New default platforms Jellyfin and Unified Remote for Windows, macOS, and Linux.
  • Keyboard support for LG webOS (untested, please give feedback) and Unified Remote.
  • A new touchpad interaction mode - drag actions. Great as an alternate navigation mode for existing platforms and as a mousepad for Unified Remote
1 Like

hi.
i would like to create a button to a specific youtube video and a specific spotify list to start on my android tv…
how do i do that?

See this section of the Home Assistant Android TV remote integration documentation. You should be able to use the media_player.play_media or remote.turn_on actions to open a specific video or playlist, and then create a button in this card to call that action.