Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Remove single entity limit in some circumstances #158

Open
TheJulianJES opened this issue Aug 10, 2024 · 0 comments
Open

Remove single entity limit in some circumstances #158

TheJulianJES opened this issue Aug 10, 2024 · 0 comments
Labels
enhancement New feature or request

Comments

@TheJulianJES
Copy link
Contributor

Issue

The following code limits devices to one entity on an endpoint depending on if the Zigbee device type and HA domain match.
This has caused issues in the past (with config entities, but will also apply to normal entities). It's a remnant of when clusters were limited to one entity. The implementation also isn't ideal in the first place (comparing Zigbee devie type with HA domain).

if platform == cmpt_by_dev_type:
# for well known device types,
# like thermostats we'll take only 1st class
endpoint.async_new_entity(
platform,
entity_and_handler.entity_class,
endpoint.unique_id,
entity_and_handler.claimed_cluster_handlers,
)
break

Migration

A migration for the unique IDs will also need to happen in Home Assistant Core if we change this.
Alternatively, we could try and leave the unique ID of the matching entity the same and just add the others with a the cluster id suffix, like done for unmatched entities.

@TheJulianJES TheJulianJES added the enhancement New feature or request label Aug 10, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
enhancement New feature or request
Projects
None yet
Development

No branches or pull requests

1 participant