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
73.89k stars 30.96k forks source link

Netatmo integration: some presets aren't translated #128600

Open Nickduino opened 1 month ago

Nickduino commented 1 month 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 1 month 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 1 month ago

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

Nickduino commented 1 month ago

@cgtobi Hi Tobias,

Could you check out this topic? Maybe HA should add an auto preset that could be used by all integrations?

cgtobi commented 1 month ago

@Nickduino this has nothing to do with the original issue, right? Please open a separate issue to track this. Thanks

Nickduino commented 2 weeks ago

@Nickduino this has nothing to do with the original issue, right? Please open a separate issue to track this. Thanks

Well, the opinion of the maintainer of a climate integration on the subject of presets vs HVAC modes is pretty related. I see 2024.11 has improved things dramatically, though.

As for the translation of the pressure trend, I deleted my message here and opened another issue.

home-assistant[bot] commented 2 weeks ago

netatmo documentation netatmo source