Clooos / Bubble-Card

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

Bubble card button is unable to trigger input_button helper #568

Closed 0verEngineer closed 2 weeks ago

0verEngineer commented 3 weeks ago

Describe the bug
I have a bubble card button and an input_button helper and i have the input_button entity in the bubble card button but it is not triggered.

To Reproduce
Steps to reproduce the behavior:

  1. Create input_button helper
  2. Create bubble card button with input_button as entity
  3. Click the bubble card button
  4. See the problem (check the last triggered state of input_button)

Expected behavior
The input_button should be triggered

Thank you! 🍻

Clooos commented 3 weeks ago

Hi! You're issue seems related to this one:

https://github.com/Clooos/Bubble-Card/issues/496

Just change the service to input_button.press then it should works.

0verEngineer commented 3 weeks ago

@Clooos Thanks a lot for the fast answer, however i don't know why, i tried like this and it did not work:

- type: custom:bubble-card
            card_type: button
            entity: input_button.nightmode_trigger_button
            name: Nachtmodus
            show_state: false
            tap_action:
              action: call-service
              service: input_button.press
              target:
                entity_id: input_button.nightmode_trigger_button
Clooos commented 3 weeks ago

You need to add this action under button_action, with your YAML it only works by tapping the icon, this YAML should works:


          - type: custom:bubble-card
            card_type: button
            entity: input_button.nightmode_trigger_button
            name: Nachtmodus
            show_state: false
            button_action:
              tap_action:
                action: call-service
                service: input_button.press
                target:
                  entity_id: input_button.nightmode_trigger_button
0verEngineer commented 3 weeks ago

Unfortunately this does not work either

Clooos commented 3 weeks ago

Oh I realize that you haven't added any button type, add this button_type: switch, this should works now 🤞

But indeed if it works I will have to take a look at this, the switch type is supposed to be the default if undefined, I probably forgot something about that.

0verEngineer commented 3 weeks ago

Do you mean like that:

- type: custom:bubble-card
            card_type: button
            entity: input_button.nightmode_trigger_button
            name: Nachtmodus
            show_state: false
            button_type: switch
            button_action:
              tap_action:
                action: call-service
                service: input_button.press
                target:
                  entity_id: input_button.nightmode_trigger_button

does not work.

Clooos commented 2 weeks ago

Just to be sure have you updated Bubble Card to the latest version?

0verEngineer commented 2 weeks ago

Oh man i am so sorry, it works with the latest version.