What I’d like to do is set a default theme so when guests log in it doesn’t blind them. I tried the automation method and it didn’t seem to work. Is there an easier method I am overlooking?
I know how to change themes but this does not show me how to attach a theme to a user. I want it to be a specific theme on a certain user when they log in. In this case the guest user. If I log into this user on a different device it does not keep the dark theme I chose on my desktop.
Bumping for help.
I set up an automation that sets the frontend theme on HA start.
- id: '...'
alias: Set Theme on HA Start
description: ''
trigger:
- event: start
platform: homeassistant
condition: []
action:
- data:
name: <theme_name>
service: frontend.set_theme
This I’ve tried as well, but it does not change the default log in screen, which is still blindingly white.
did you find a solution ?
I’m also curious if a solution was found
I am interested as well. I need to set up specific theme for kiosk mode (where is no option to adjust “user” settings)
not sure if this is what you want - but to set a default theme that any device will see when they open HASS, this worked for me…
in automations.yaml
- alias: 'Set theme at startup'
trigger:
platform: homeassistant
event: start
action:
service: frontend.set_theme
data:
name: THEME_YOU_WANT
based on the docs:
and the info given above, I built this automation which triggers at HA start and sun up/down to switch themes:
alias: "Theme: Auto Change"
description: trigger at HA startup / sun up / sun down
trigger:
- event: start
platform: homeassistant
- entity_id: sun.sun
platform: state
to: above_horizon
id: up
- entity_id: sun.sun
platform: state
to: below_horizon
id: down
action:
- choose:
- conditions:
- condition: trigger
id: down
sequence:
- service: frontend.set_theme
data:
mode: dark
name: day_and_night
- conditions:
- condition: trigger
id: up
sequence:
- service: frontend.set_theme
data:
mode: light
name: day_and_night
default:
- service: frontend.set_theme
data:
mode: light
name: day_and_night
mode: single
``