number: add a restore_mode (like in a switch) #3514
Unanswered
TCB13
asked this question in
Component enhancements
Replies: 3 comments 2 replies
-
|
🏷️ I've automatically added the |
Beta Was this translation helpful? Give feedback.
0 replies
-
|
|
Beta Was this translation helpful? Give feedback.
2 replies
-
|
Existing option works for number. I use it in several cases. Actual functionality of course depends on platform. |
Beta Was this translation helpful? Give feedback.
0 replies
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Uh oh!
There was an error while loading. Please reload this page.
Uh oh!
There was an error while loading. Please reload this page.
-
Component name
Number
Link to component documentation on our website
https://esphome.io/components/number/
Describe the enhancement
On a switch component there's a
restore_modethat can be set to something likeRESTORE_DEFAULT_ON.On a number however there's only a mostly useless
restore_value: truethat never works (same board). Can we have the same logic used for therestore_modeon the switch ported to the number? If it works for a bool should work for a float as well.Thank you.
Use cases
Be able to restore number component values after restart. Very useful if you've something the user can set like a time to do some action and you want it to persist across reboots.
Anything else?
No response
Beta Was this translation helpful? Give feedback.
All reactions