Frontend theme not set at start

I have this automation to select always the same theme at restart of HA:

- alias: 'Set DarkMix theme'
  initial_state: 'on'
  hide_entity: false
  trigger:
    - platform: homeassistant
      event: start
  condition: []
  action:
    - service: frontend.set_theme
      data:
        name: 'DarkMix'

But it doesn’t work as at startup i always get the default theme.
What is wrong?

Check what theme is set in your user profile. It should be “Backend-selected”.

Where to check it? Where is user profile?

Screenshot_2019-10-11%20Home%20Assistant

Ok, it’s backend-selected, but maybe it’s set after i manually switch to darkmix theme…

maybe i must put darkmix as default theme here? And not running having the automation at startup?

You can do that or if you want to change it with an automation leave it as backend-selected.

I think the name of your theme might have to be in lower case.

  action:
    - service: frontend.set_theme
      data:
        name: 'darkmix'

So if i understand better, if i put darkmix in my user profile, it will be loaded at startup, while if i want to change the theme i must run the automation putting backend-selected in my user profile. Right?

That is correct yes.