Save frontend theme selection

Hello to all,
I searched the forum and found some similar questions, which give different answers. Maybe some are outdated. :thinking:
I want use a theme which should be selected on startup per default:
I added this to my configuration.yaml:

# themes
frontend:
  themes: !include_dir_merge_named themes

The theme file *.yaml I put in the (new) folder “themes” in my config-folder.
Now I can select the theme in my profile. I changes immediately. So far so good.
But when I shutdown the server and restart it the setting is on “Backend-selected”, my theme selection wasn’t saved. Should this work as I expect ?

I’m running 0.113.1.

That’s weird. If you use incognito mode or turn on some settings, stuff like that may not be saved to your browser. If this keeps happening, add an automation like this:

- id: set_theme
  alias: Set Theme
  trigger:
  - platform: homeassistant
    event: start
  action:
  - service: frontend.set_theme
    data:
      name: Light Theme

Or for auto night themes:

- id: set_theme
  alias: Set Theme
  trigger:
  - platform: homeassistant
    event: start
  - platform: state
    entity_id: sun.sun
  action:
  - choose:
    - conditions:
      - condition: sun
        after: sunrise
      sequence:
      - service: frontend.set_theme
        data:
          name: Light Theme
    - conditions:
      - condition: sun
        after: sunset
      sequence:
      - service: frontend.set_theme
        data:
          name: Dark Theme

Thank you! :+1:
It was the incognito mode.