home-assistant / core

:house_with_garden: Open source home automation that puts local control and privacy first.
https://www.home-assistant.io
Apache License 2.0
72.63k stars 30.4k forks source link

Netatmo integration: some presets aren't translated #128600

Open Nickduino opened 22 hours ago

Nickduino commented 22 hours ago

The problem

@cgtobi Hi Tobias

I encountered an issue with two presets of the Netatmo Thermostat: they're not translated

image

In the climate.py, it seems you import some presets from HA's climate component, that are translated:

image

And you define some with hard-coded names:

image

What version of Home Assistant Core has the issue?

core-2024.10.2

What was the last working version of Home Assistant Core?

No response

What type of installation are you running?

Home Assistant OS

Integration causing the issue

Netatmo

Link to integration documentation on our website

https://github.com/home-assistant/core/tree/536d702d96af511fc958e925fb3f5f7293f284f3/homeassistant/components/netatmo

Diagnostics information

No response

Example YAML snippet

No response

Anything in the logs that might be useful for us?

No response

Additional information

I'd like to offer the following translations for French:

PRESET_FROST_GUARD = "Hors-gel" PRESET_SCHEDULE = "Planning" PRESET_MANUAL = "Manuel"

Translations for frost guard and schedule are what the Netatmo app calls them. There is no manual mode, though, I'm not sure what this is referring to.

I see they're missing icons as well. For PRESET_FROST_GUARD = "Hors-gel", I would suggest mdi:snowflake and for PRESET_SCHEDULE = "Planning", I would suggest mdi:calendar-month

Nickduino commented 22 hours ago

I digged in the translation in Lokalise (I'm out of my depth here, not sure how all that works) and I found a key used by the Netatmo code from HA that says just that: "Frost guard" = "Hors-gel"

image (You see the original key name is HG, as in Hors-Gel)

I can't do a PR or create a key in Lokalise because I'm an idiot but I hope you have most of what you need to correct things. Happy to answer further questions that may arise.

cgtobi commented 12 hours ago

Thank you @Nickduino for bringing this up and investigating this issue.

Nickduino commented 4 hours ago

I realize the translation isn't done either for the pressure trend of the weather station:

image