Clooos / Bubble-Card

Bubble Card is a minimalist card collection for Home Assistant with a nice pop-up touch.
MIT License
1.72k stars 47 forks source link

Creating bubble card without entities #262

Closed joaopedros2 closed 8 months ago

joaopedros2 commented 8 months ago

From what I've tested, I didn't see an option to create a bubble card without relying on an entity. My goal was to have a button that simply calls a service when pressed. In Mushroom Cards, there's an option for templates for these cases.

type: custom:mushroom-chips-card
alignment: center
chips:
  - type: template
    content: Iniciar
    icon: mdi:power-on
    icon_color: green
    tap_action:
      action: call-service
      service: ffmpeg.start
    hold_action:
      action: none
    double_tap_action:
      action: none
  - type: template
    content: Parar
    icon: mdi:power-off
    icon_color: red
    tap_action:
      action: call-service
      service: ffmpeg.stop
    hold_action:
      action: none
    double_tap_action:
      action: none
  - type: template
    content: Reiniciar
    icon: mdi:restart
    icon_color: yellow
    tap_action:
      action: call-service
      service: ffmpeg.restart
    hold_action:
      action: none
    double_tap_action:
      action: none

It would be very useful to have this feature in this project as well.

Clooos commented 8 months ago

Hi and thanks for your feedback, for now this is not possible but you can call a script with a button.

joaopedros2 commented 8 months ago

Thank you for the response, but I'm still unsure how to do this without defining an entity.

Clooos commented 8 months ago

The script is the entity: script.name