I created some helpers to essentially test and make some fake devices. For example a input_number for humidity:
So it seems trivial but I want to display the number a percent and it seems you have to set the ‘unit_of_measurement’ which form what I can see is only in YAML. So do I delete these helpers and manually add to my config file? Can you not add the ‘unit_of_measurement’ to the existing GUI helper via YAML?
If you create the helper via gui you can set the unit via gui
If you create the helper via yaml you can set the unit via yaml or if you added a unique id as well via gui
Because it’s considered to be an invalid option and produces the following error message.
Configuration warnings
Invalid config for ‘input_number’ at configuration.yaml, line 317: ‘unique_id’ is an invalid option for ‘input_number’, check: input_number->test_number->unique_id
input_number:
test_number:
name: Test Number
min: 0
max: 50
step: 1
unique_id: test_number_abc12345
If you create an Input Number via the UI, use the UI to add unit_of_measurement. The resulting entity’s configuration is stored in JSON format in a file within the hidden .storage directory.
If you create an Input Number via YAML, use YAML to add unit_of_measurement. The entity’s configuration is stored in YAML format in the configuration.yaml file within the visible config directory.
As you’ve seen in the other screenshot, it does exist. Why it doesn’t exist in your screenshot requires investigation. For starters, what is your version of Home Assistant ?
You can’t add it there. Whatever you add there isn’t permanent (as you have already discovered).
No, if the Input Number’s configuration has been defined in YAML, in the configuration.yaml file, you simply add the unit_of_measurement to its configuration.
On the other hand, if the Input Number was defined via the UI then, yes, it can be done like that but it should not be necessary. That option can be specified via the UI (on a properly functioning system).
I’m running 2025.2.1 and the option is visible in the UI. So, yeah, there may be a problem with your system.
You can start by refreshing the browser’s page (Ctrl-F5 or whatever key combo used by your browser) to ensure it’s not due to page-caching.
If that doesn’t fix it, then we’re at the ‘grasping at straws’ stage. For example, ensure your Home Assistant account has administrative privileges.