Auto Dark/Light Mode Switching

I’m trying to setup an automation to switch between dark/light for my themes depending on the Sun level - I figured this would be easy but it’s not working as expected…

I originally just called the set_theme service (with my profile configured to ‘Backend-Selected’) and set mode to dark or light accordingly… thinking that I was switching between the light or dark mode - however after re-reading the options it seems this configures a theme to use when in dark mode vs a theme in light mode.

So I guess the only option is to hard set my profile to use either light for example (not dark or auto) then use set_theme to switch the light mode theme between a ‘day’ and ‘night’ version?

Does anyone know how this can easily be accomplished using the ‘Mushroom’ theme that accompanies the Mushroom cards? - If I use the radio buttons in the profile option I can toggle the theme perfectly between light and dark, but when I look inside the theme file there is hardly anything in it.

    # Home Assistant override
    ha-card-box-shadow: 0px 2px 4px 0px rgba(0,0,0,0.16)
    ha-card-border-radius: 12px
          sidebar-primary-text: olive
          sidebar-secondary-text: olive
          sidebar-primary-text: slategray
          sidebar-secondary-text: slategray

I tried to make a copy of the theme - name it ‘night’ and remove the ‘light’ section from modes… but it didn’t help. :man_shrugging: