Stuck at "Loading data" after upgrade to 0.108.x (due to input_selects)

So… This makes no sense to me. All releases of 0.107 works perfectly fine. I upgrade to 0.108.x (I think I’ve tried 'em all) and it gets stuck at “Loading data” after a refresh in the browser. After spending several hours of troubleshooting on this I’ve discovered something.I have been removing all integrations and components to try and find the culprit. And that pointed me in a very unexpected direction… If I exclude my input_selects it starts!

So I started to remove my input_selects one by one to try and see if there is an error in anyone of them. It got even stranger. I discovered that I my bunch of input_selects that show what “state” a room is in (“Morning”, “Day”, “Evening”, “Night”, “Custom”) are the culprit. I have one of these for each room in the house but also one for the garage, outside and the whole house. As is tradition with this issue it gets weirder. Not all of the input_selects causes it to break, three of them work.

These work:

scene_garage:
  name: Belysning
  options:
    - Anpassad
    - Morgon
    - Dag
    - Kväll
    - Natt

scene_house:
  name: Belysning
  options:
    - Anpassad
    - Morgon
    - Dag
    - Kväll
    - Natt

scene_outside:
  name: Belysning
  options:
    - Anpassad
    - Morgon
    - Dag
    - Kväll
    - Natt

But for example, these three break it:

scene_big_office:
  name: Belysning
  options:
    - Anpassad
    - Morgon
    - Dag
    - Kväll
    - Natt

scene_kitchen:
  name: Belysning
  options:
    - Anpassad
    - Morgon
    - Dag
    - Kväll
    - Natt

scene_master_bedroom:
  name: Belysning
  options:
    - Anpassad
    - Morgon
    - Dag
    - Kväll
    - Natt

I have 13 of these input_selects, 10 break HA, 3 works and as far as I can see there is no difference between those that work and those that don’t. Having just one of these 10 (no other input_selects at all) breaks HA without fail.

I have no idea on how to pursue with my troubleshooting and certainly no idea on what’s really wrong. Halp plx

New twists and turns in this strange tale. Doesn’t seem to have been the fault of the input_selects. It seems to have been caused by some bayesian binary sensors. For some reason commenting them out didn’t seem to be sufficient but completely deleting them from the file made the input_selects works.

So solved for now but something seems to have radically change with 0.108

What was the Bayesian config that did not work?

Thanks for this, I was having the same issue with stuck at loading and disabling my bayesian sensors did the trick.

Unfortunately my bayesian sensors are my presence sensors so ti’s breaking a ton of stuff, but more annoyed that there was nothing in the changelog regarding bayesian sensor changes that would break anything.

Definitely something with bayesian sensor.
Reverting lib/python3.7/site-packages/homeassistant/components/bayesian/binary_sensor.py to version from Feb 25 (https://github.com/home-assistant/core/pull/27721) allows my Home Assistant to restart and pass the “loading data” screen properly.

Looking through the change history it looks like there was a major change to how the sensor was initialized here https://github.com/home-assistant/core/pull/30962

Can I tag the person who made that pull request here? @jlmcgehee21 ?