jaydeethree / Home-Assistant-weatherdotcom

Home Assistant custom component/integration for Weather.com
GNU General Public License v3.0
35 stars 5 forks source link

Weather description #8

Closed Ayuus closed 9 months ago

Ayuus commented 9 months ago

Hello,

In case of Sunny weather, the sensor weather_description in the Netherlands displays "beautiful" ("mooi" in Dutch), where "Sunny" ("Zonnig"in Dutch) seems more appropriate. Is this configurable somewhere?

Regards,

Ronald

jaydeethree commented 9 months ago

The weather description comes from the Weather.com API, specifically from the wxPhraseLong property:

https://docs.google.com/document/d/1UOjfN1j54Ocmwj-zYCcHG_RM1tlNceW_qlzz0wVILXA/edit

Since this is coming directly from Weather.com I'm not able to change it or control it. However as an alternative you could use the state of the weather.LOCATION_NAME entity - that uses the Home Assistant weather descriptions:

https://developers.home-assistant.io/docs/core/entity/weather/#recommended-values-for-state-and-condition

And that is based on the iconCode property that's returned by Weather.com:

https://docs.google.com/document/d/1qpc4QN3YDpGDGGNYVINh7tfeulcZ4fxPSC5f4KzpR_U/edit

Which gets mapped to the Home Assistant weather descriptions here:

https://github.com/jaydeethree/Home-Assistant-weatherdotcom/blob/57439b96cb35603bed54c941ce4a1b2631cbfb75/custom_components/weatherdotcom/const.py#L48