-
Notifications
You must be signed in to change notification settings - Fork 32
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
Localisation also applies to sensor names #406
Comments
This is how localization works in Home Assistant and not specific to this integration. Translation of states and attributes follow the language set in the personal profile. |
Hi @astrandb , thank you very mch for the quick reply.
OMFG, I didn't knew this. 🤯 But why? I'll then try to reinstall the integration and see what happens. |
So I changed the locale, reinstalled the integration and finally got english names, as expected.
Some more information on this ^ Apparently the core integration do not translate the resource / sensor ids, but only the description. It'd be really great if we/you could adjust to this style, because I think that technical terms, like the resource ids should not get translated at all. |
Well, that is not correct IMO. Just to be sure what you are referring to: If an integration (core or custom) supports entity translation the entity_id will be created in the HA system language that is in use when the integration is installed. If you change the system language later and restart HA the friendly name will be changed but the entity_id remains unchanged. I just verified by installing the moon integration. |
Hi, I am "complaining" about the localised entity_ids, correct. As pointed out in the initial post, the localisation for the entity_ids is (in my eyes) not great:
I wanted to use this card in HA: charger-card And found out that I got only the status, but no numbers. -> and this was the point to reach out I have currently the idea to keep my locale in English, then delete and reinstall the integrations in question, and then afterwards switch the HA language back to German, but this is hardly a good solution. I can also understand that the change of the localisation-handling is some amount of work for you and it might even be a breaking change, but I still ask you to change this localisation setting for the entity-ids. |
I fully understand your point, but we just use the translation model that HA supplies. We will not invent a new translation architecture for this integration. There are some 3500 users of this integration and it would be a breaking change everyone except for those running in english system language. It would also lead to some confusion among users if this integration behaves differently from all other integrations in HA. AFAIK the charger-card allows custom mapping of display elements to entity_id:s so I think you can acheive a working setup that way. |
Can you point me to the "the translation model that HA supplies"? Thank you for the discussion. :-) |
HA is a continously evolving open source project and there is no comprehensive documentation that covers all design considerations. The source code is the final answer how things are implemented - in most cases. Some design questions are discussed and decided here : https://github.com/home-assistant/architecture/discussions |
The problem
Hi there,
I was wondering why the charger-card did not show an values for my Easse charger when it was in action and found out that my sensors are also localised:
Example:
sensor.CHARGERNAME_dynamic_circuit_limit
-->sensor.CHARGERNAME_dynamisches_stromkreislimit
sensor.CHARGERNAME_reason_for_no_current
-->sensor.CHARGERNAME_grund_fur_keinen_strom
I see this as a problem, because we lose the sensor name as a common interface for integrations.
Additional information
Apparently the sensor names are generated of the "name" items:
see
easee_hass/custom_components/easee/translations/de.json
Lines 140 to 145 in 5608be4
Version of Easee integration having the issue?
easee-v0.9.58
Version of Home Assistant Core having the issue?
core-2024.3.3
The text was updated successfully, but these errors were encountered: