custom-cards / slider-button-card

A button card with integrated slider
MIT License
105 stars 16 forks source link

[feat] Add Support for input_number domain #61

Closed rohankapoorcom closed 10 months ago

rohankapoorcom commented 10 months ago

Creating a new branch and PR since I can't fix the merge conflicts on @lizsugar's original PR (https://github.com/custom-cards/slider-button-card/pull/7). Rebases their branch on top of mainline and then includes includes a doc update.

This adds support for the input_number domain and makes the entities far far easier to manage on a mobile touch display vs. the builtin entities card.

image

One note: There is a current oustanding bug where if the input_number.entity.min value is not cleanly divisible by the input_number.entity.step value, then the slider card is off by an amount. If your input_number has min = 5, max = 25, step = 5 then it will work just fine. But if the step is 2, then it will be off. This also has the side effect of changing the input_number to an "illegal" value when modified via slider-button-card. Step = 1 always works.

If anyone has any insight I would appreciate the help. Otherwise, I am submitting as is, because it is largely functional right now.

Closes #18

Closes #33