custom-cards / button-card

❇️ Lovelace button-card for home assistant
MIT License
1.93k stars 233 forks source link

multi-calls documentation/examples what's possible and what isn't #659

Closed commentsonly closed 1 year ago

commentsonly commented 1 year ago

2 things I'd love to see. First of all I stumbled across that multi-call: by accident. Wasn't aware that's possible. You'll find if ever 2-3 threads about it in the ha community forum. Must be a well hidden secret. So may I ask for some examples for the lovely card? I know it's one of the sub-aspects the card offers in general since so not being disgussed a lot, but the potential is massive after I played with it, since it reduces the need for scripts or automations by some amount if being able to simply stick the code into the card itself. Though I never tried to figure out if a script or automation or a card containg multiple servicecalls being differnt in processing.

second one is one where I completely lost that the moment. As said I stumbled across a code snipped going like this:

  action: nothing
  multi-calls: |
    [[[````
with multiple hass.callService entry being js code.
What I do wonder if it must be js code or if I could use normal YAML aswell. Tried to adopt a snipped from an automation which did contain some - if: then: else: lines aswell as -cinditions: but I'm lost since no errors shown means no way to know what actually fails.

If not being possible and js is the only way, I got stuck in firing a hass.callService for mqtt.publish
Likely a syntax problem since I'm completely unsure about how to struct this call with topic and payload.
Within yaml my mqtt.publish looks like this:
Mariusthvdb commented 1 year ago

I take it you did check eg https://community.home-assistant.io/t/custom-button-card-insert-short-delay-between-multiple-calls-for-a-tap-action/489422

where it is well documented?

dont expect any development on this card, especially not if not required because of already possible...