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

vacuum.py: set unique_id #18

Open
wants to merge 1 commit into
base: master
Choose a base branch
from
Open

Conversation

stek29
Copy link

@stek29 stek29 commented Jan 21, 2025

fix #17

@AlexxIT
Copy link
Owner

AlexxIT commented Jan 21, 2025

There is no point in taking hash from name if we use name in unique_id anyway.

@stek29
Copy link
Author

stek29 commented Jan 22, 2025

There is no point in taking hash from name if we use name in unique_id anyway.

What if there are “Bathroom” and “bathroom”? The ID goes through slugify.

@AlexxIT
Copy link
Owner

AlexxIT commented Jan 22, 2025

In both cases, the ID will already be unique.

@stek29
Copy link
Author

stek29 commented Jan 22, 2025

@AlexxIT

>>> from homeassistant.util import slugify
>>> slugify('living-room') == slugify('living_room')
True
>>> slugify('Bathroom') == slugify('bathroom')
True

@AlexxIT AlexxIT self-assigned this Jan 25, 2025
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.

Добавить Unique ID к виртуальным Vacuum'ам
2 participants