Skip to content

Fix aliases typing#234

Open
mj23000 wants to merge 1 commit intoGrandMoff100:v6_rewritefrom
mj23000:v6_rewrite_fix_aliases
Open

Fix aliases typing#234
mj23000 wants to merge 1 commit intoGrandMoff100:v6_rewritefrom
mj23000:v6_rewrite_fix_aliases

Conversation

@mj23000
Copy link
Copy Markdown
Contributor

@mj23000 mj23000 commented Apr 14, 2026

Looks like the latest? (Changed 4 weeks ago in the codebase) version of Home Assistant changed the way that aliases are handled.

This PR adds a tuple[None] as an accepted value (instead of just adding None as an accepted value) (I'm guessing that None is only present by itself).

The WebSocket method's type is:

vol.Optional("aliases"): [vol.Any(str, None)],

So mirroring that with:

aliases: list[str | None] = Field(default_factory=list)

Might be better.

@mj23000 mj23000 requested a review from GrandMoff100 as a code owner April 14, 2026 09:52
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant