palazzem / ha-econnect-alarm

Home Assistant integration that provides a full-fledged Alarm Panel to control your Elmo/IESS alarm systems.
BSD 3-Clause "New" or "Revised" License
10 stars 5 forks source link

refactor: use slugify function to generate the entity name as HA expects #52

Closed palazzem closed 9 months ago

palazzem commented 9 months ago

Related Issues

Proposed Changes:

Use HA public util slugify() to generate the entity name. The previous approach was working properly, even though it was relying on an internal mechanic where the entity name is normalized and then used as entity_id.

With this change we're explicit in how the format is.

Testing:

Add testing to ensure we don't have __ (as it happens in snake-case) when there is a space in the name.

Extra Notes (optional):

n/a

Checklist