WTH input number actions only allow increment/decrement by step?

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.

1 Like

Yes :smiley:

So now only we need in the core :slight_smile:

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:
image

Service call:
image

action: input_number.increment
target:
  entity_id: input_number.test_negative_1
data: {}

After:
image

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.

1 Like

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.

2 Likes