Here are the available service calls for Input Number.
Your example uses a service call that doesn’t exist (input_number.set_range). There’s no service call to set the value of an Input Number’s min and max options.
Please consider marking my post above with the Solution tag. It will automatically place a check-mark next to the topic’s title which signals to other users that this topic has been resolved. This helps users find answers to similar questions.
While I wouldn’t recommend doing so for most users… If you absolutely need dynamic max, min, or step variables you can use a Template Number entity instead of an Input Number helper.
To avoid the dreaded XY problem, it might be more beneficial for you if you explain what you are trying to accomplish in a broader sense rather than asking about a specific method. There may be more appropriate integrations or other tools than number-type entities.
I want to give limit for the input Max_watt_use which is 90% of the Max_watt_house
In example if the user input 1000 for Max_watt_house. Then when the user want to input Max_watt_use there is limit, so the user only can input 0-900 for the Max_watt_use
I don’t know what you did, but it didn’t put a Solution tag anywhere.
However, it no longer matters because, as long as you don’t mind changing at least one of the two Input Numbers to a Template Number, you’ll get the ability to adjust its min/max values.
Step 1: Set up an Input Number to use as a place to store the state of your Template number. For purposes of the rest of this example I will use input_number.max_watt_save. When you set up your helper, set the min and max to the widest acceptable limits that you would ever use. Remember, this is just a storage helper.
Step 2: Set up your Template number in your configuration.yaml or templates.yaml file.
Can you please check my code, maybe there is something wrong? Because it doesn’t work. I code this in configuration.yaml which is in studio code server
I don’t understand what you mean by the above statement.
Things to check…
Did you restart/reload HA so your number entity gets instantiated?
The entity you will want to use in the frontend will be number.max_watt_use, notinput_number.input_max_watt_penggunaan. You have set input_max_watt_penggunaan
to be your storage helper…