-
Notifications
You must be signed in to change notification settings - Fork 579
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
[FR] Weather State not translated #2899
Comments
Hi, I can look into this but I haven't met the issue myself, and I ask Nabu the weather daily. Probably did, but have you checked your voice assistant settings? And you're not running a development version in those examples? |
I the meantime, I checked I had no custom intent, and commits to the weather integration or intents that could explain a behaviour change. I could just as well add this mapping, but I want to understand. The initial mapping not working is what got me into rewriting the weather intent in the first place. In your example, If your weather improves and you get |
@bors-ltd Agreed. LEt me ping @synesthesiam before doing any extra work. Hold tight |
@bors-ltd Translation of state is hacky today - Basically creating a mapping and testing it against the "raw" state value. |
Wait.. no I do not think this work either. ok hold on again 😂 |
Speaking of translated state, I was thinking about using the But it's more of a bypass than anything. Edit: here's a example from using a custom file in the configuration directory (and assuming the behaviour is the same than shipped with the intents repo): Template:
Result:
And I have my own shenanigans with the weather domain, like not exposing the wind gusts anymore. |
Another update, I finally took the time to read the developer documentation, and now I have a development environment up and running. I set up a new HA instance, with the France/French settings, and set up a few forecast entities: As you can see, the cards are presented in English, although everything else is in French. And indeed now I could reproduce your bug: And as I suspected, we get "Partly cloudy", and not the keyword "partlycloudy", and it would be maddening to re-translate the English translation of a keyword, when that job was already done for the French language. So there's a deeper cause to the weather entities not translating... or a development environment is not 100% representative, and I'm following the wrong track. If that's a real bug, I guess I'm lucky not to get it (yet?) on my own instance, and I use both the MET and Metéo France integrations. |
Here's a funny one, could it be related? While working on my contribution to the holiday integration, I find out it's named "Holiday" when adding it in the UI, while it's named "Vacances" in my production instance. Could just as well be a coincidence or limitation of the dev env. |
Bottom line Core is not able to provide good translation because core has only one language. But many pipelines can have many different language in the same system. So. We're axing the translation (or more like the attempt to translate) So we will be able to properly translate actual state value such as |
I guess we can work on that soon. And make it ready for the next release. (And align in beta if we kissed anything) I'll test every sentence after the beta cut. I suspect this change may affect other intents |
Well, that sorts it out. 🤣 Bummer we have to duplicate the translation work, but I can also close a never exposed branch about accessing the raw condition value. PR incoming. |
As it goes for every exposed entity of any domain from now on. This concludes uncertainty about the content of "state.state", and will have the nice side effect of putting the development environment on par with the production behaviour. Fixes home-assistant#2899
PR pushed! #2910 Took me longer than expected because I'm not happy with the code duplication. So I started a branch in core to have reusable templates and macros in intents. But it's taking too long, so I made it quick and dirty to match the release milestone. I'm open about naming the weather conditions, we have to please everyone, or as many people as possible, in every French-speaking country. |
@bors-ltd Hey 👋🏻
I am creating an issue to check if you want to fix this yourself, as you did a really great job with the weather intent in French (Credits where it's due ;) )
The weather state (On both our default and detailed sentences) does not seem to be translated.
A small mapping of all weather states and their corresponding French translation would be worth it.
The available states can be found here:
https://developers.home-assistant.io/docs/core/entity/weather/
Important note:
Feel free to tell me if you do not have the time to fix this.
In any case, I will assign this ticket to myself in a few days and fix it in case you are unavailable.
Have a great day.
JLo
The text was updated successfully, but these errors were encountered: