Open anoril1979 opened 2 years ago
Bas's frontend automations use a different set of theme files.
Try this instead:
automation:
- alias: "Frontend: change theme"
trigger:
- platform: state
entity_id: input_select.theme
- platform: state
entity_id: input_boolean.dark_mode
- platform: state
entity_id: input_boolean.theme_alternative
- platform: homeassistant
event: start
action:
- service: frontend.set_theme
data:
name: >
{% set name = states("input_select.theme") -%}
{% set mode = "dark" if is_state("input_boolean.dark_mode", "on") else "light" %}
{% set suffix = "-alternative" if is_state("input_boolean.theme_alternative", "on") else "" -%}
ios-{{ mode }}-mode-{{ name }}{{ suffix }}
Hi!
I've just installed ios-themes. Themes appear in the theme dropdown in the user parameters. Themes are well applied from there.
I then added your frontend automation file. Automations are well listed in my automation list. But when I click on "execute", nothing happens. I set the entities panel with the theme selector input, aside with dark mode toggle and alternative theme toggle. Every thing is well presented on my lovelace. But when I selected a theme from the drop down list, toggle the dark mode knob or the laternative knob, nothing happens.
Using HA 2021.8.8, User Interface 20210909.0
System Health
Home Assistant Community Store
GitHub API | ok -- | -- Github API Calls Remaining | 4951 Installed Version | 1.15.2 Stage | running Available Repositories | 877 Installed Repositories | 4Home Assistant Cloud
logged_in | false -- | -- can_reach_cert_server | ok can_reach_cloud_auth | ok can_reach_cloud | okLovelace
dashboards | 2 -- | -- resources | 2 error | /volume1/@appstore/homeassistant/var/config/ui-lovelace.yaml not found views | 2 mode | storage