Lovelace: Button card

Sorry if this has been answered already. I searched through and couldn’t find the answer.

I’m trying to execute a rest command but I can’t seem to figure out the syntax. Right now I’m having to create a script for every rest_command and then execute each script from the button card. For example, to pause directv, I use the following script:

  'directv_pause':
  alias: Pause
  sequence:
  - data: {}
    service: rest_command.directv_pause

and then I execute the above script from the button-card like so:

          type: "custom:button-card"
          entity: script.directv_pause
          icon: mdi:pause
          name: 
          color: rgb(255,20,147)
          action: toggle              

How do I execute the rest_command straight from the button card instead of executing the script? The following does not work:

          type: "custom:button-card"
          entity: rest_command.directv_pause
          icon: mdi:pause
          name: 
          color: rgb(255,20,147)
          action: toggle

Never mind. This seems to be the correct answer:

      - type: "custom:button-card"
        icon: mdi:pause
        action: service
        service:
          domain: rest_command
          action: directv_pause
          data:

Is button card not compatible with 0.88? The build in button card for lovelace is not so good, missing status for other entity than lights and does not have customization features. So hope this custom card will be updated :slight_smile:

in 0.88 I have this issue “Custom element doesn’t exist: button-card.” :frowning:

Fix for issue on 0.88

https://github.com/kuuji/button-card/issues/57

3 Likes

thanks ! :slight_smile:

Not working for me.

Also worked for me but the on/off colors now don’t seem to work.

I reverted Hassio back to 0.87. I guess I will try an alternative to this card, as it breaks a bit too often for me…

same here, card still not loading, cache cleared

I think there is already a pull request to fix this button card for 0.88

I believe it is related to the breaking change with <paper-button>

I tried this fix and though the buttons show, only text is showing. No status and no icons. Also I tried to merge the hacky code to use a long_press action on these buttons but that no longer seems to work :(. I’m having quite a dilemma now. Either I downgrade to an older version of HA (which is the least preferred) or I find some alternative to this button (if there are any) or option 3 is to hope this card will work again (but I really depend on the long_press action too) pff. I wish the good stuff from this card would end up in the current official entity button card.

Oh well, off to bed. At least I can press the buttons for the time being :stuck_out_tongue:

I wish the good stuff from this card would end up in the current official entity button card

You might just get your wish soon :wink:

1 Like

Tell us more please…

In my Ios phone my buttons has a totaly diffrent color then on my normal windows Machine using Chrome. Any idee to why that might be=??

So is it working on 0.88? Relying heavily on this button card for my installation

1 Like

The fix posted above does work, but no icons and no states for me. But I have read that most good functions will come to core soon. So for the time being either do not upgrade or use this temporary fix.

I too rely heavily on this card (and I had a modified version so I could use a hold action instead of only a tap action). Anyways the fix makes it at least usable for the time being. Unfortunately I have already modified all the other breaking changes so I don’t want to downgrade again.

So all that is left is this card which @kuuji unfortunately no longer maintains (at least that is what I have heard). Too bad because this is by far much better than the official one. Even the hacky modified version I used with the hold action worked soo much better than the original one. For some reason whenever I use the original one with a hold action, the hold action never works on my iphone except when it works once it will continue to work for a few times.

Are you saying that you are using @ammmze commits from six hours ago and listed below, and you still have no icons and states?

Ah no it was from yesterday :stuck_out_tongue: haven’t checked out the new commit. Will do tonight. Hadn’t seen that it was updated. Thanks.

Yeah the commit is 95% of the way it used to be but I have this button slightly larger than before.

I use the standard code button card for the 2 on the left and the kuuji one for the one on the right here
image
I only started using kuuji button so it would show the colour change for an input_boolean… pre 0.88, all of these 3 buttons looked identical.
Perhaps I should just use kujji button for all 3?

1 Like