Skip to content

[Bug]: theme YAMLs ship empty modes: blocks that fail HA validator #1910

Description

@firestaerter3

Requirements

  • I checked the troubleshooting section in the README to verify that I have the latest Mushroom version.
  • I did a search to see if there is a similar issue or if a pull request is open.
  • I have read the state of card mod support (in pin issues) and understand card mod support is not provided in this repository.

Current Behavior

Each of the four bundled theme files (mushroom.yaml, mushroom-shadow.yaml, mushroom-square.yaml, mushroom-square-shadow.yaml) ends with:

  modes:
    light: {}
    dark: {}

HA's frontend validator rejects this at startup with one error per theme:

Theme Mushroom [Square] [Shadow] is invalid: must contain at least one of light, dark. for dictionary value @ data['modes']

Four boot errors per startup (one per theme), and additional errors each time themes get reloaded.

Expected Behavior

No validation errors. Themes load and remain selectable.

Steps To Reproduce

  1. Install Mushroom v5.1.1 on HA 2026.6.1
  2. Restart Home Assistant
  3. Check the core log: four "Theme ... is invalid" errors appear

Environment

  • HA Version: 2026.6.1
  • Mushroom: 5.1.1
  • Browser: n/a (server-side validator)

Anything else?

The empty modes: light:{} dark:{} blocks are semantically a no-op (no overrides specified for either mode), so the cleanest fix is to drop the modes: key entirely from mushroom-shadow.yaml, mushroom-square.yaml, and mushroom-square-shadow.yaml. For mushroom.yaml specifically, since the only content was the modes: block, the top-level key needs Mushroom: {} to remain a valid theme dict.

I searched open issues for "light, dark", modes invalid, and theme invalid and none match. Happy to send a PR if useful.

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions