The input number helper only have actions to increase/decrement by the step. It could be useful allow set the amount to increment/decrement.
Already possible but i guess thatâs not in the UI
It is not actually by 1. It is by the step setup in the input number.
But you can also use set_value and do math from current number to how much you want to increment/decrement.
Are you sure youâre not talking about a feature from Spook? Input number - Spook đ» a scary powerful toolbox for Home Assistant.
Yes
So now only we need in the core
I am not getting the issue.
This is a helper:
input_number:
test_negative_1:
min: -10000000
max: 10000000
step: 0.1
mode: box
Before:
Service call:
action: input_number.increment
target:
entity_id: input_number.test_negative_1
data: {}
After:
No need for Spook.
And why a custom integration (even if it was written by a famous person) was chosen as a âsolutionâ???
I need a diferent increment every time on same helper. Sometimes 1, somentimes 126
And set_value wonât work why?
Then what you need is adding a âstepâ parameter for âinput_number.incrementâ service - since currently it uses a âstepâ attribute of a particular âinput_numberâ entity.
And the current title of this WTH - âWHT input number actions only allow increase/decrement by 1â is incorrect & misleading.
Because a need increment. Yes, I could use a template to calculate the result, but It is more clean have a action with the amount
Updated title
Not âby stepâ.
Any increment/decrement is made by some step naturally.
The point is that you need a service call with ANY step, not predefined.
I am sorry. I am just not understanding.
Can you show a use case where this would be needed without using/needing a template anyway?
I use a number for control the total food cost. Any time I buy anything I add the cost.
Yes, I can create a script that get the value and add the new cost and save it, but I think others people could be need the same feature and I would be easy to add it.
What is being asked for is an increase or decrease by a relative amount.
If this was implemented it could be for more than just the number entity,
for example increase light brightness or volume of a media player from the current value, by a relative amount, rather than a fixed amount.
As an example:
I use a script with a repeat action to gradually turn up the volume of Google Home speakers until they reach the set target passed to the script, so that when I walk into a room the music volume increases gradually rather than suddenly jumping to the target amount.
I could however change the amount to increase the volume at each step, rather than use the increase volume action, that way if the volume is muted, I could increase the volume in larger steps, but if it is closer to the target volume, I could increase by smaller steps.