Clooos / Bubble-Card

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

Slide button cannot control input_numbers helpers? #401

Closed shadow7412 closed 3 months ago

shadow7412 commented 4 months ago

Describe the bug A clear and concise description of what the bug is.

To Reproduce Steps to reproduce the behavior:

  1. Create a helper called lounge_volume (or whatever, but this is the example I'm using)
  2. Add the following to the dashboard
    
    - type: custom:bubble-card
    display_mode: slider
    entity: input_number.lounge_volume
    type: custom:bubble-card
    card_type: button
    button_type: slider
    show_state: true

![image](https://github.com/Clooos/Bubble-Card/assets/286341/671ec6aa-52cd-4b52-b225-38b62afc4662)

3. Note that the percentage in the screenshot is 47% - but the bar is empty.
4. Interact with the slider. Doing so will change the amount the bar is filled, but not update the value
![image](https://github.com/Clooos/Bubble-Card/assets/286341/5493bc6f-ad9f-4dc3-b04d-20f476bf21e9)

**Expected behavior**
I expected the control to read the value from the helper, and also update it.

**Screenshots**
Shown in reproduction steps.

**Desktop (please complete the following information):**
 - OS: [e.g. iOS] Reproduced on both Linux and Android.
 - Browser [e.g. chrome, safari] Vivaldi
 - Version [e.g. 1.6.2] 1.7.3

Thank you! šŸ»
Clooos commented 4 months ago

Hi and thank you for your feedback, for now the sliders only supports lights and media players. You are not the first one to ask for that feature and I will add that possibility soon.

bjwo commented 3 months ago

Thank you for this amazing card. I would like to +1 this feature request - I would like to be able to set my covers to a specific position by tapping a location on the slider - similar to a lights brightness.

Clooos commented 3 months ago

This is now a new feature in the v2 beta!

Here is the link to the full changelog: https://github.com/Clooos/Bubble-Card/releases/tag/v2.0.0-beta.1

shadow7412 commented 2 months ago

I've finally had a chance to give this a whirl.

It's looking close, but it's trying to set between the range of -100 to 0 instead of 0 to 100. Is this a known bug or should I try and provide more details?

Clooos commented 2 months ago

Hi, can you provide more details indeed? I was not aware of this issue.

shadow7412 commented 2 months ago

This is the helper image

And this is the (relevant part of) the entity card I'm trying to use this in.

type: entities
entities:
  - type: custom:bubble-card
    card_type: button
    button_type: slider
    entity: input_number.lounge_volume

And this is the error that pops up image

I've tried adding the button directly to the dashboard, and the same error occurs. I don't believe using it inside an entities card is relevant to the issue. I also don't see any configuration regarding the ability to override the range (not that it should be necessary).

Let me know if there's anything else more specific I can add.

Clooos commented 2 months ago

Thank you! I will take a look for the next beta.

GyroGearl00se commented 2 months ago

Much appreciated that you're implementing this feature request. I can confirm that I have the same issue with the negative value. If needed I could also try to provide some details ?

Clooos commented 2 months ago

I've fixed it in the last beta (v2.0.0-beta.6), can you confirm this? :)

shadow7412 commented 2 months ago

That's done the trick - thanks for that :)

GyroGearl00se commented 2 months ago

Yes, now it is working as expected. Thank you very much. šŸ‘

Clooos commented 2 months ago

You're welcome! I still have a few bugs to fix but the next release should be the true last beta šŸ¤ž

gdude2002 commented 1 month ago

While this appears to work for input_number in the current version (v2.0.1), it doesn't work for number entities.

No value is shown, and it's impossible to change the value.

image

I can confirm that this value may be viewed and changed from the usual entity information popup.

image

Clooos commented 1 month ago

Hi, you are not the first to tell me that but like I said in the documentation and in the editor, this is expected as the sliders are just supporting lights, covers, media players and input numbers at the moment.

image

But I will work on that really soon!

Clooos commented 1 month ago

I will add this case in my code right now, could you just send me the attributes of this entity? You can find it in "Developer tools" > "States". I don't have any number entities.

image
gdude2002 commented 1 month ago

Sorry for taking a bit, I had to step away from my desk. Hope these help!

Entity: number.vidal_sassoon_cutting_height State: 4

State attributes:

min: 1
max: 9
step: 1
mode: auto
friendly_name: Vidal Sassoon Cutting height
Clooos commented 1 month ago

I've just added an experimental support for these entities in v2.0.2, can you tell me if it works as expected?

https://github.com/Clooos/Bubble-Card/releases/tag/v2.0.2

gdude2002 commented 1 month ago

I can confirm that number entities now work as expected. Thanks for your hard work!

Clooos commented 1 month ago

Hell yeah! šŸŽ‰