Hi,
Is it possible to choose the language in the darksky sensor? It is possible to change the units, but not the languages? On the website it is possible to choose different languages.
Thanks
Hi,
Is it possible to choose the language in the darksky sensor? It is possible to change the units, but not the languages? On the website it is possible to choose different languages.
Thanks
I have found some information in the Darksky Docs: The api allows to change the language.
lang=[language] optional
Return summary properties in the desired language. (Note that units in the summary will be set according to the units parameter, so be sure to set both parameters appropriately.) language may be:ar: Arabic
az: Azerbaijani
be: Belarusian
bg: Bulgarian
bs: Bosnian
ca: Catalan
cs: Czech
…
It would be great if it is possible in home assistant too!
The topic was already addressed: for states or short descriptions you can make your own translation with templates. For the long summary description, the underlying “forecastio” python library does not support the language variable. Until the developer updates it, you can tweak your own install.
See:
The “forecastio” python library hasn’t been updated for a year now. What about forking that project and merging the Pull Request with the fix and using that library instead of the original version?
That would give everyone the ability to simply add a language option in Home Assistant instead of tweaking the library.
Other than forking the code, you will need to publish it to PyPI (Python Package Index). I have no idea if you can take over the same name with a new version, or you need to give a new name like “forecastio2”.
Maybe first it would be worth to try to contact the original dev if he is willing to merge the pull request or transfer the repo ownership.