Lovelace: Button card


#391

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

#392

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:

#393

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:


#394

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


#395

Fix for issue on 0.88


#396

thanks ! :slight_smile:


#397

Not working for me.


#398

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


#399

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…


#400

same here, card still not loading, cache cleared


#401

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>


#402

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:


#403

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:


#404

Tell us more please…


#405

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=??


#406

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


#407

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.


#408

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


#409

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.


#410

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?