VacuumZones
VacuumZones copied to clipboard
vacuum.py: set unique_id
fix #17
There is no point in taking hash from name if we use name in unique_id anyway.
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.
In both cases, the ID will already be unique.
@AlexxIT
>>> from homeassistant.util import slugify
>>> slugify('living-room') == slugify('living_room')
True
>>> slugify('Bathroom') == slugify('bathroom')
True
@AlexxIT I just realized that it's possible to have just the hash in the unique_id, would that be better?