Initial usage for Input Components

As it is today, if I have an input_boolean, input_slider, input_select etc, the default on HA when started is either a) the first/minimum/last saved value 2) the value if you use “Initial”

The problem with this is, HA often re-starts with an unwanted value. For example, if I have an input_slider for brightness on a light switch and I don’t use “initial”, it uses the minimum value (some cases, it uses the last known setting in the DB, but it’s not consistent). If I use “initial”, it forgets my last used preference before the restart in favor of the “initial” value. This creates issues, when using input components for a “user settings” type screen.

I’m suggesting the following:

  1. HA checks the database for the last used state and uses that if present
  2. If no state is in the DB, use “initial”
  3. If no state in the DB and no “initial” defined in the config, then use the first/minimum value