Input Select - Odd Issue

Having an odd issue with an input_select I use to set the house mode.
On boot everything is fine, but after several hours, the options for the input select disappear. I can only select one item on the list, it’s as if the rest don’t exist anymore. Can’t select it from the lovelace card and automations to change it throw an api error. Reboot and they’re all back and everything works fine again for a number of hours.

input_select:
    house_mode:
        name: House mode
        options:
            - Home - Morning
            - Home - Afternoon
            - Home - Evening
            - Home - Night
            - Away
            - Babysitter
            - Vacation

Might have something to do with the dashes in the options. Try quoting them.

        options:
            - 'Home - Morning'
            - 'Home - Afternoon'
            - 'Home - Evening'
            - 'Home - Night'
            - Away
            - Babysitter
            - Vacation

Also what does the input_select’s options attribute look like in the developer tools / states menu?

Both before and after the issue.

This is after a fresh reboot. All options show up in the entity card, automations can fire them, but the states menu only shows Home - Morning. I’ll try quoting them now.


After quoting them, this certainly looks better.

I’ll keep an eye on it over the next day or so.

1 Like

Didn’t solve the issue. Haven’t touched the system at all and here’s what it’s showing now.

Capture

Trying with " quotes now instead of ’

No quotes, single bar quotes ’ and double bar quotes " all net the same result after 7 or 8 hours.

Anybody have any other ideas or have seen this type of behavior before?

Have you tried without dashes in the options?

input_select:
  house_mode:
    name: House mode
    options:
      - 'Home Morning'
      - 'Home Afternoon'
      - 'Home Evening'
      - 'Home Night'
      - Away
      - Babysitter
      - Vacation

Easier said than done. The modes are controlled on another system, turn on a virtual switch and then I’m using those switches being on or off to set the option for the input-select. The selected option then triggers a number of different automations. So it’s not as simple as removing the “-”, there’s a ton of re-writing involved on more than 1 system :frowning:

The input-select was the very first device I created on HA a few months ago and it worked fine until maybe a week back when this started happening.

Options that disappear over time is … unusual. First suspect would be an automation that alters the input_select’s options but you didn’t mentioning having such an automation. Next suspect is a bug because you indicated this behavior didn’t exist until recently. Can you attribute its presence to any updates you may have done recently?

NOTE
I believe the concept of “Helpers” was introduced one or two versions ago. You can now create an input_select (called a “Dropdown”) via the UI using Configuration > Helpers. An input_select created this way is stored in the hidden .storage folder as opposed to configuration.yaml. In theory, you can have input_selects created both ways and they will peacefully co-exist. Wild guess: maybe something weird happens when it attempts to consolidate input_selects created both ways (perhaps only after a restart?). This is the only recent change to input_selects that might (emphasis on “might”) have some bearing on the behavior you’re seeing. :man_shrugging:

That was my very first thought as well. I had started writing automations to control the input_select but then realized I had it running perfect on Hubitat and could do it simpler so I scrapped the whole project and just setup the one automation to change the input_select based on those switches. So it’s a very simple setup and I’ve double and triple checked that it’s select_option not set_option.

I also suspect a bug, I had been holding off updating because of all the issues I’ve seen with 4.8, but I crossed my legs, arms, fingers and toes and updated to 0.110.5 and 4.9 at the same time. Here’s hoping that does it.

Well the 4.9 update seems to have fixed me up. I may be speaking too soon but I’ve made it over 24hrs and all options are still there.

I come back in the thread in case it can help someone else: I had the same issue and it was due to my error in an automation, which called input_select.set_option in place of input_select.select_option .

5 Likes

Thanks a lot! I had the same issue, found your comment and this fixed my issue!

Same here!

Same issue with a set_option that snuck into a template where it should have been select_option.

Just an additional note: although only a single option is selectable, the full list of options still appears when looking at the helper settings in the UI. This caused me to discard the possibility that I had actually used set_option at first.

Same here! Thank you! I see this is a common bug.

Having this issue as well. Replying here to let everyone know the solution provided above still works.

1.) Get rid of set.option (weird this is even an option in the UI)

2.) Restart HA