HA changes input_select (auxiliary entity) after restarts

Hello, there is a situation on my HA that appears to be a bug. In order to always maintain a safe functionality, I use to restart the HA (via an automation) every day at 04:00 AM.
Everything is perfect! , but there is a situation:

I have an auxiliar entity : input_select.maquina_de_lavar

that few seconds after the HA restarts, this entity changes to the first selection option, bypassing the last selection made by the automation:

What could be wrong? No trigger occurs that afect this entity just after HA restarts so it is expected that the last selection still valid but it is not what happens.

I chose to force the correct selection by an automation after the reset but would this be the most elegant solution?

image

The behavior you are describing is what would be expected from an Input Select configured in YAML with an invalid initial value… it would default to the first option after every restart.

I would suggest deleting the Helper, restarting HA, and then recreating the Helper.

[quote=“Didgeridrew, post:2, topic:810929”]

Hello, your comment about the default option caused me to carefully review again the YALM code and I discovered that in the action for select an option, I wrote an extra word not set in the entity options: Instead of "Parada” I wrote "Parada Final " what was wrong.

However, what led me to not observe this was because after executing the automation, the entity on the dashboard showed the first word of select option: "Parada ", which led me to consider that the code was correct. I fixed it and let’s see the next reboot.

Original code:

  • action: input_select.set_options
    target:
    entity_id: input_select.maquina_de_lavar
    data:
    options:
    - Parada Final

“Corrected code”
action: input_select.set_options
target:
entity_id: input_select.maquina_de_lavar
data:
options:
- Parada

Thank you Very Much!

I doubt that is the action you want to use. The action input_select.set_options essentially erases all the available options and overwrites them with the value(s) you provide… your nightly restart is reloading the originally configured options and the state is defaulting to the first list item.

You probably want to use input_select.select_option.

action: input_select.select_option
target:
  entity_id: input_select.maquina_de_lavar
data:
  option: Parada