Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Add Support for input_number domain #188

Open
wants to merge 5 commits into
base: main
Choose a base branch
from

Conversation

lizsugar
Copy link

@lizsugar lizsugar commented Apr 28, 2022

This was requested in issues #161 and #7
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.

Outstanding bug: Rounding error when input_number step is set to certain values (observed easily with step set to 2 or 3)
@goldenpipes
Copy link

was just about to suggest this!

lizsugar added 2 commits May 20, 2022 12:26
the step and the max of an input_number entity.

Appears that at this time applyStep() is unnecessary, and was in fact
causing the problem  I have tested stepped sliders of both input_number entities as well as
light and climate entities, and stepping still works as expected when
applyStep() is not called at all.

This does not resolve the issue where step count results in "illegal"
values on certain input_number entities.
@Helios-light
Copy link

I wish this will be available soon. I'm real waiting for this. This add-on is wonderfull.

@Helios-light
Copy link

If I understand well, the fonction is ready with a minor bug. Can you merge it in a beta we can try it ?

@ivancristina
Copy link

May this pull be merged? Looks like a very nice feature. Thank you very much Liz!

@lizsugar
Copy link
Author

lizsugar commented Jun 2, 2022

PR submitted to maintained version of slider-button-card custom-cards#7

@pickonedev
Copy link

How should be used? I am trying to add an input_number but I get error, like does not exists...

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

5 participants