Slugify, please

This doesn’t merit a ‘What The Heck’ but it it would be a useful feature to have.

An entity_id cannot contain spaces, accented characters, uppercase characters, etc. If you supply a name containing any of that, Home Assistant converts it into what’s called a ‘slug’ (lowercase ASCII characters, numbers, and underscores). The verb to describe this conversion process is ‘slugify’.

It would be handy to have a slugify filter for use in templates. On several occasions I’ve encountered the need to convert a string into a valid slug and the process of using replace can be very long-winded and messy. A slugify filter would greatly reduce the template’s complexity.

At a minimum, it would be great to have more explicits errors messages that explains the characters restrictions in the name of an entity_id.

Good news!