Skip to content

Add labels field to EntityRegistryEntry#246

Open
jan-kuechler wants to merge 1 commit into
HomeAssistant-API:mainfrom
jan-kuechler:websocket-support-labels
Open

Add labels field to EntityRegistryEntry#246
jan-kuechler wants to merge 1 commit into
HomeAssistant-API:mainfrom
jan-kuechler:websocket-support-labels

Conversation

@jan-kuechler

Copy link
Copy Markdown

This one-line PR allows to read the entity labels via the entity registry.

See https://github.com/home-assistant/core/blob/902159387848e70ff93a0b99a09e3768c21bb1d3/homeassistant/helpers/entity_registry.py#L219 for the HomeAssistant model, which contains labels: set[str].

I did not need to update the tests, as the model creation is covered by test_entity_registry.py / test_list_entity_registry. The recorded cassettes contain the labels field in the HA response.

@codecov

codecov Bot commented Jul 9, 2026

Copy link
Copy Markdown

Codecov Report

✅ All modified and coverable lines are covered by tests.

📢 Thoughts on this report? Let us know!

@jan-kuechler

Copy link
Copy Markdown
Author

The Coda Standards / Code Styling error seems to be unrelated:

Run uv run zuban check homeassistant_api
homeassistant_api/processing.py:120: error: Subclass of "str" and "bytes" cannot exist: have distinct disjoint bases [unreachable]
homeassistant_api/processing.py:121: error: Statement is unreachable [unreachable]
Found 2 errors in 1 file (checked 21 source files)
Error: Process completed with exit code 1.

I've only touched homeassistant_api/models/entity_registry.py

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.

2 participants