Core: cannot modify default theme

Created on 8 Nov 2017  路  23Comments  路  Source: home-assistant/core

Home Assistant release (hass --version): 0.57.2
Python release (python3 --version): Python 3.5.4
Component/platform: frontend

Description of problem

I'd like to modify the theme. The docs suggest adding a separate one and creating an automation which selects that, but I consider this a workaround.
I'd expect the following config snipped to modify the default theme:

Problem-relevant configuration.yaml entries and steps to reproduce:

frontend:
  themes:
    default:
      primary-color: orange

instead, another theme is created, also with the name "default" (which appears two times in the theme picker).

waiting-for-reply

Most helpful comment

+1 on a simpler way to setup the default (backend-preferred) theme. I am aware one can create and ad-hoc automation for this, and make a system call upon HA startup. This seems over-complicated though.

It would be much nicer to be able to set the default under the "frontend:" integration in configuration.yaml,
Something like

frontend:
  theme-default: midnight

All 23 comments

The docs suggest adding a separate one and creating an automation which selects that, but I consider this a workaround.

No automation needed. Can be selected in the frontend.

I would say, it's a bug that it's possible to use default for a user theme.

Can be selected in the frontend.

of course I can go to configuration > set a theme to "pick a theme for this device.", but I'd like to set/modify the default for new devices

There hasn't been any activity on this issue recently. Due to the high number of incoming GitHub notifications, we have to clean some of the old issues, as many of them have already been resolved with the latest updates.

Please make sure to update to the latest Home Assistant version and check if that solves the issue. Let us know if that works for you by adding a comment :+1:

@balloobbot this is still an issue with homeassistant-0.64.3

I am also interested in this. Changing the default theme should be an easy option.

I am using an automation to set the default theme. It might be more of a workaround though. Add this to automations.yaml if you want to try it. This assumes there is a theme named darkcyan

- alias: 'Set theme at startup'
  initial_state: 'on'
  trigger:
   - platform: homeassistant
     event: start
  action:
    service: frontend.set_theme
    data:
      name: darkcyan

There hasn't been any activity on this issue recently. Due to the high number of incoming GitHub notifications, we have to clean some of the old issues, as many of them have already been resolved with the latest updates.

Please make sure to update to the latest Home Assistant version and check if that solves the issue. Let us know if that works for you by adding a comment :+1:

@balloobbot still an issue with 0.81.6

There hasn't been any activity on this issue recently. Due to the high number of incoming GitHub notifications, we have to clean some of the old issues, as many of them have already been resolved with the latest updates.

Please make sure to update to the latest Home Assistant version and check if that solves the issue. Let us know if that works for you by adding a comment :+1:

@balloobbot Still an issue with 0.91.4

There hasn't been any activity on this issue recently. Due to the high number of incoming GitHub notifications, we have to clean some of the old issues, as many of them have already been resolved with the latest updates.
Please make sure to update to the latest Home Assistant version and check if that solves the issue. Let us know if that works for you by adding a comment 馃憤
This issue now has been marked as stale and will be closed if no further activity occurs. Thank you for your contributions.

Still an issue with 0.96.2

There hasn't been any activity on this issue recently. Due to the high number of incoming GitHub notifications, we have to clean some of the old issues, as many of them have already been resolved with the latest updates.
Please make sure to update to the latest Home Assistant version and check if that solves the issue. Let us know if that works for you by adding a comment 馃憤
This issue now has been marked as stale and will be closed if no further activity occurs. Thank you for your contributions.

Still an issue with 0.100.2

+1 on a simpler way to setup the default (backend-preferred) theme. I am aware one can create and ad-hoc automation for this, and make a system call upon HA startup. This seems over-complicated though.

It would be much nicer to be able to set the default under the "frontend:" integration in configuration.yaml,
Something like

frontend:
  theme-default: midnight

+1

My use case:
I have six devices connected to HA. 3 mobiles, 2 Tablets and the PC.
My wife is connected via an own user and prefers her own theme.
Once, selected on her mobile, it stays active until she changes - ok.
On my mobile Phones and Tablets, other themes are active and stay active as well.
But on my PC, the selected theme always change to the default after logging of.
When I set the theme via automation, the themes on all devices will be changed.
That is not useful.
So it might be a good way, to set a theme according to a user and/or device.

@pirol62: I think this is a separated use case

back to topic:
indeed it would be useful to set a theme as default, as I have the need to change only one property bound to an automation item. For example - one special window/door is open I want to change the primary color of the frontend....

Cheers,
Matthias

There hasn't been any activity on this issue recently. Due to the high number of incoming GitHub notifications, we have to clean some of the old issues, as many of them have already been resolved with the latest updates.
Please make sure to update to the latest Home Assistant version and check if that solves the issue. Let us know if that works for you by adding a comment 馃憤
This issue now has been marked as stale and will be closed if no further activity occurs. Thank you for your contributions.

Still an issue on 0.111.4; two default entries show up in the frontend. Compared to previous versions, it seems that using config in the original issue, both default themes point to an orange-customised theme (whether they're actually the same and/or affecting default or not remains to be seen).

And still it would be better to bind the default theme to the user. I always log off in order to avoid errors. All settings like default theme, vibration etc. are at default then.

Can anyone think of a reason not to have a config option to set the default theme instead of having to rely on an automation to fire later in the startup process? I am not Python developer by any stretch of the imagination but I did look at the initialization code for the frontend and seems like adding this would be a pretty simple and straightforward change. I would be willing to try putting up a PR for this if it is likely to get approved.

In the latest release, it keeps backend selected themes, but I'd like a way to change it from the UI.

Was this page helpful?
0 / 5 - 0 ratings