Skip to content

Fix issue where theme select does not appear when user's theme is deleted#12104

Merged
bramkragten merged 1 commit intohome-assistant:devfrom
ZephireNZ:fix/missing-theme
Mar 24, 2022
Merged

Fix issue where theme select does not appear when user's theme is deleted#12104
bramkragten merged 1 commit intohome-assistant:devfrom
ZephireNZ:fix/missing-theme

Conversation

@ZephireNZ
Copy link
Copy Markdown
Contributor

Proposed change

Fixes #11701 where the theme selection is missing.

This is because the code is trying to check if the theme supports light/dark mode, but this won't work if the theme has been deleted.

This is a quick fix, and means the selector appears again. Perhaps there could be a better fix, where we reset the user's theme if it's one that has been deleted?

Type of change

  • Dependency upgrade
  • Bugfix (non-breaking change which fixes an issue)
  • New feature (thank you!)
  • Breaking change (fix/feature causing existing functionality to break)
  • Code quality improvements to existing code or addition of tests

Example configuration

Additional information

Checklist

  • The code change is tested and works locally.
  • There is no commented out code in this PR.
  • Tests have been added to verify that the new code works.

If user exposed functionality or configuration variables are added/changed:

@ZephireNZ
Copy link
Copy Markdown
Contributor Author

To recreate issue/test the fix:

  1. add two different themes to HA
  2. switch to a theme in your user settings
  3. delete one of the theme from your config
  4. restart HA, and attempt to change your theme

@bramkragten bramkragten merged commit 27ca61e into home-assistant:dev Mar 24, 2022
@github-actions github-actions bot locked and limited conversation to collaborators Mar 25, 2022
@ZephireNZ ZephireNZ deleted the fix/missing-theme branch March 28, 2022 07:26
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.

Projects

None yet

Development

Successfully merging this pull request may close these issues.

Theme selection field disappears, when selected theme is deleted

3 participants