-
-
Notifications
You must be signed in to change notification settings - Fork 358
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
feat(input-number-card) #676
Conversation
@RonNabuurs can you add a screenshot showing the card like in similar PR's? |
@Misiu I've added a few images. Though I found out that there was already a number-input module. So maybe I need to update this MR to reuse a lot of that code. |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Thank you for the contribution. I was a little busy so I didn't take time for review 😅
Can you add number
support ? I think it can be nice to have it too 🙂
And the component can be renamed number-card
instead of input_number-card
.
You can also add example in the showcase yaml file.
src/cards/input-number-card/const.ts
Outdated
|
||
export const INPUT_NUMBER_CARD_NAME = `${PREFIX_NAME}-input-number-card`; | ||
export const INPUT_NUMBER_CARD_EDITOR_NAME = `${INPUT_NUMBER_CARD_NAME}-editor`; | ||
export const INPUT_NUMBER_ENTITY_DOMAINS = ["input_number"]; |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
number
domain should be supported as well
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
It would be nice that this card works not just for input_number domain, but for setting other numeric values. For example appliances like sous vide and air fryer target temperature/time.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
@spuljko What's the type of the entities you want to add support ?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
@spuljko What's the type of the entities you want to add support ?
I was thinking about it, and came to counlusion that it would be better to add slider as option in template card. I will create new feature request for that.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
We can't add the slider to template card. It will add too much fields on the template card editor. Why people would need to build a custom slider ?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
As I've said, appliances like air fryer, kettle, rice cooker, sous vide. There are two numbers that can be set: cooking time and temperature. Then there is humidity for dehumidifiers, watering time for splinkers, position for smart bed, and lots of other uses. Making separate card for all of that would take lot of time, but having slider that can call some service would do the job.
Why it's still not merged? |
Because changes have been requested. |
@piitaya, why don't you take over and fix the requested change? |
I hope I didn't step on any toes by doing this but since I needed the number card myself I implemented the requested fixes here: Also, since number and input_number are generic entities I thought it useful to add the ability to set a custom slider color. The ability to set a custom icon and slider color is here: |
Any progress on this one? It's the last thing I need to replace with a mushroom card on my mobile UI. |
@piitaya any idea if this will ever be merged? |
b4b7761
to
9729400
Compare
@DannyFeliz I suggested some changes but the author didn't respond. Each contributor is responsible for his/her PR. It's not my job to fix others work. For this one, I fixed the missing points (documentation, yaml showcase example, number domain supports) because of the high demand. I also added icon color and display mode (slider or buttons). |
Sorry I did not respond to the suggestions you've made, but I haven't find the time to implement your suggestions. Thanks for implementing them and closing this issue/PR |
does this have the ability to change step sizes? i'd like to be able to snap to 5% increments for example. |
It uses the step of your number entity. |
Well that sucks because I can't change that. The Number Box card on HACS allows for this and works great but doesn't match the theme |
You can define the number in the configuration yaml of home-assistant input_number:
slider:
name: Your number
initial: 30
step: 30
min: 0
max: 240
unit_of_measurement: Minutes That would solve your problem right? |
does anyone have any idea why I do not see this card after updating the mushroom integration? |
* feat(input-number-card) * Add number domain support * Add doc and icon color support * Add display mode option * Update config --------- Co-authored-by: Paul Bottein <[email protected]>
Description
This pull request will add an input-number card.
Related Issue
#230
Motivation and Context
I needed this for my automation of sprinklers. I have an input_number card for the time the sprinklers will turn on.
How Has This Been Tested
I have tested this on my own Home Assistant installation and locally with a docker container
Types of changes
Checklist