Nerwyn / android-tv-card

A completely customizable universal remote card for Home Assistant. Supports multiple platforms out of the box.
Apache License 2.0
249 stars 12 forks source link

can't click on a specific source - image doesn't display #150

Closed 1mfaasj closed 4 weeks ago

1mfaasj commented 1 month ago

I'm using this card for some time now (thanks for that! ) but can't keep up with all of the changes recently. Do you mind helping me to fix the image (and source) again please?

I'm using the latest version of your card and HA.

See the card code that I'm using here: https://pastebin.com/CTp3MHz7

The image (nlziet source) is not displayed anymore and I can't click it on?! It doesn't take action on the TV. I was using this before but has the same issue:

  custom_actions:
    nlziet:
      tap_action:
        action: source
        source: nlziet://
      style:
        background-image: >-
          url(https://seeklogo.com/images/N/nlziet-logo-6FB1C30F53-seeklogo.com.png);
        background-repeat: no-repeat;
        background-size: contain;
        background-position-y: center;

I have also the same issue when I use a different image URL, like: https://www.telefoonnummer-klantenservice.nl/wp-content/uploads/2022/06/NLZIET-logo.jpg

1mfaasj commented 1 month ago

Ok after some more testing: the source is working and when I set an icon, it works. but I want the image back though

Nerwyn commented 1 month ago

What does your custom action look like once you've updated your remote config using the update old config button?

It should look something like this, which works for me:

custom_actions:
  - type: button
    name: nlziet
    tap_action:
      action: source
      source: nlziet://
    styles: |-
      button {
        background-image: url(https://seeklogo.com/images/N/nlziet-logo-6FB1C30F53-seeklogo.com.png);
        background-repeat: no-repeat;
        background-size: contain;
        background-position-y: center;
        border-radius: inherit;
      }
1mfaasj commented 4 weeks ago

thanks! it works now