Frontend.set_theme not working

:man_shrugging: working on iOS/safari, windows/chrome, windows/edge. Don’t have access to a mac & safari or fully kiosk.

When I do it in development tool > service then both browsers are changing correct…
Automation is enabled…

I have to dig into this deeper

I realy don’t know what this is.
I opened HA in Chrome on my Samsun Tablet. Theme set to backend. On my Safari on MacOS same situation. When I do manual set_theme my Safari is changing but not on my Tablet.

I opened also Chrome and Firefox on my MacOS and in Safari in change theme. All browsers on my MacOS Changing…

But nothing happen on Tablet. What can it be?

Are you expecting the theme to change on your tablet when you change it on your MAC?

Also, keep in mind, older IOS devices aren’t really supported. I.e. gen 2 ipads etc

It worked always but at certain moment it was stopping working.
My Tablet is a Android with FKB.

On all browsers I logged in with same username. All browsers on iMac are changing correct only the tablet is not work

I’m trying to get you to elaborate, which you aren’t doing.

Are you changing the theme on the tablet? Or are you changing the theme on your iMac and expecting the change to occur on your tablet?

Yes!

This automation was always working. For al browsers that loggin on HA.

- id: "7e98e973-70c1-4809-8fec-56dbf82b492b"
  alias: "System - Automatic Theme Change Day/Night"
  trigger:
    - platform: homeassistant
      event: start
    - platform: sun
      event: sunset
    - platform: sun
      event: sunrise
  condition: []
  action:
    - service: frontend.set_theme
      data:
        name: "{{ 'iOS Light Mode' if is_state('sun.sun', 'above_horizon') else 'iOS Dark Mode' }}"

Dude… there are 2 questions that I asked that are mutually exclusive. YES cannot be to both. Answer the question.

YES / NO?

YES / NO?

No I change theme on iMac whit Developer tool > service action
And yes I expecting it will change also on my tablet. (because the automation was working always and on certain moment it stopped working) So yes I expect that when I use Developer tool >. Service that all browsers will change their Theme.

On your tablet, if manually changing a theme in FKB works when you select it from the theme page, but it does not work when backed-selected is used, then the issue lies in FKB.

Tried to do the same on the tablet. Developer Tool > Service.
Browser on tablet itself doesn’t change but browsers on my iMac are changing.

Tried te steps on FKB and Chrome browser on my Tablet… Only browsers on iMac change.
Its not a issue of FKB … very strange…

Can it be a issue with the HTTP section in configuration.yaml?

no.

The issue is most likely on your OS and it’s browser. However I can’t get any of that information out of you because you keep focusing on the service.

So please. On your tablet MANUALLY change the theme. Go to your user, select another theme. Answer the following question: Does the theme change when you manually change it?

Im sorry… When I change the theme manually then the theme is changing.

Ok, to me, that indicates that theme changing is working however your browser is not refreshing after the backend selected is applied. This would typically be an issue with your os/browser, seeing that it works for other operating systems and browsers.

So, if you aren’t on the latest android OS, update to it on that tablet. As things age, older OS’s won’t be supported. Hopefully you aren’t falling into this category.

Ok, i was triggered by your point of Android OS. Normal FKB automatically open when do a OS update. I went to settings of Android OS itself and saw it was in Darkmode status.

I Change it back to Lightmode status and now the theme updates are working again.

So the Darkmode option in Android Settings are blocking the change… I don’t know how…

Thanks for all the patient and helping to solve this. It was something outside HA, Browsers but a simple Light/Darkmode option of Android itself.

That sounds like a bug then. I’d report that with that information.

1 Like
alias: Switch Theme
description: ""
trigger:
  - platform: state
    entity_id: input_select.theme_selector
action:
  - data_template:
      name: "{{ states('input_select.theme_selector') }}"
    action: frontend.set_theme
input_select:
  theme_selector:
    name: Theme Selector
    options:
      - "default"
      - "ios-dark-mode"
    initial: "default"
    icon: "mdi:theme-light-dark"

Now need to test how to make the browser_mod and card_mode to work so that I can enable and disable side and topbars.

the following isn’t working yet.

  - action: browser_mod.set_theme
    data:
      dark: dark
      theme: auto