Hi there. So i have the following automation that is meant to change the theme of lovelace when lights are switched on/off, problem is its not working for me properly… it will change the theme (of the cards only for some reason instead of the whole lovelace ui like it does if I manually select theme? Weird…) when lights are switched from on to off but does nothing when lights are switched from off to on. I have tried various other code examples from ha forums with no luck - as in I modify the examples to suit and check config which says everything is valid but the automation doesnt change the theme for some reason. This code is the only code so far that actually even does anything remotely close to what I am trying to achieve. but it still wont work how I want it to. any ideas?
- id: '1570461067566'
alias: change theme at lights on
trigger:
- entity_id: switch.lights
from: 'off'
platform: state
to: 'on'
condition: []
action:
- data:
entity_id: 'light'
service: frontend.set_theme
- id: '1570461084660'
alias: change theme at lights off
trigger:
- entity_id: switch.lights
from: 'on'
platform: state
to: 'off'
condition: []
action:
- data:
entity_id: 'dark'
service: frontend.set_theme