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

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

Merged
merged 1 commit into from
Sep 27, 2023

Conversation

palazzem
Copy link
Owner

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

  • Related issues and proposed changes are filled
  • Tests are defining the correct and expected behavior
  • Code is well-documented via docstrings

@palazzem palazzem added this to the 1.1.0 milestone Sep 27, 2023
@palazzem palazzem self-assigned this Sep 27, 2023
@palazzem palazzem merged commit 4b68bd4 into main Sep 27, 2023
@palazzem palazzem deleted the palazzem/task-49 branch September 27, 2023 10:50
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
Archived in project
Development

Successfully merging this pull request may close these issues.

1 participant