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

Set _attr_unique_id on AttractionSensor #13

Merged

Conversation

bkeiren
Copy link
Contributor

@bkeiren bkeiren commented Jun 13, 2024

This change causes AttractionSensor entities to also set the _attr_unique_id value to a formatted string that combines the config entry ID and the attraction ID. The config entry ID is included to ensure that multiple config entries for the same park or different config entries with the same attraction IDs don't clash with each other.

This partially solves the issue in #12 by having the entities be shown as part of the integration. They are not yet linked to the device.

image
image

This change causes AttractionSensor entities to also set the _attr_unique_id value to a formatted string that combines the config entry ID and the attraction ID. The config entry ID is included to ensure that multiple config entries for the same park or different config entries with the same attraction IDs don't clash with each other.
@danielsmith-eu danielsmith-eu merged commit 3e10f8e into danielsmith-eu:main Jun 18, 2024
3 checks passed
@danielsmith-eu
Copy link
Owner

Thanks @bkeiren - I've merged and cut a new release - I think that makes it show up in HACS, please give it a go and let me know if it's done what you need.

@bkeiren
Copy link
Contributor Author

bkeiren commented Jun 18, 2024

@danielsmith-eu I can confirm this now works in the latest release, thank you!

@bkeiren bkeiren deleted the add_entities_to_config_entry branch June 18, 2024 18:49
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