-
-
Notifications
You must be signed in to change notification settings - Fork 1.7k
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
[QOL] Format Home Assistant entity names without _ #4048
Comments
I think this highly depends on how people name their entities. Personally I prefer to use snake_case for the Something we can do is to use a space instead of |
Excellent solution! |
Maybe even more fancy (not sure if this is desired):
|
Perhaps, personally I'm not bothered by case... Also what if it's "Sonoff motion" ? |
I've took that from your example in the OP. I've implemented this now, assuming this can be closed. Changes will be available in the latest dev branch in a few hours (https://www.zigbee2mqtt.io/how_tos/how-to-switch-to-dev-branch.html) |
I had been manually converting that However, a small pre-upgrade question, what happens with entities whose name is just a single word? Will these continue to need manual modification either in |
It will only be done when the friendly name contains a space (so not in this case) |
Currently Home Assistant entity names are generated with
_
which is perfectly functional but doesn't look that great in the UI and more importantly when using device triggers in automations.While it is possible to change the names manually in Lovelace it would become quite a chore proportional to number of entities a device creates.
I'm proposing a simple change of
_
into a space when generatingname:
value autodiscovery payload so the end result would be:The text was updated successfully, but these errors were encountered: