Is it possible to change the names of the moon phases from English to another language? For example: Luna llena, instead of Full moon
How do you do it?
Thank you
You can do this using templates. Here is an example of what I have:
- platform: template
sensors:
current_weather:
friendly_name: "Current Weather Condition"
value_template: >-
{% if is_state('sensor.dark_sky_summary', '弱い風') %}
light winds
the above line creates a new entity called " sensor.current_weather" and populates the state with whatever I specify accordingly with the current weather conditions that the dark sky sensor reports.
In your case you’ll need to do it for each phase that the moon sensor has.
Thank you very much for your help
Doesn’t the language setting in the user profile do this?
My moon sensor shows the phases in german.
True, but he apparently want the Latin names and we don’t have a translation for that.
Thank you all. I just checked that the names appear in Spanish. Although, in my opinion, the translation is not very fortunate (probably Latin American style).
If the default Spanish translations are incorrect, you can follow the suggestion to create a template sensor.
This example assumes you are using the Moon Sensor and called it sensor.moon
fases_de_la_luna:
friendly_name: 'Fases de la luna'
entity_id: sensor.moon
value_template: >-
{% set fases = { 'full moon':'luna llena', 'new moon':'luna nueva', 'crescent moon':'cuarto creciente', 'waning moon':'cuarto menguante'} %}
{% set fase = states('sensor.moon') %}
{{ fases[fase] if fase in fases.keys() else 'fase lunar desconocida' }}
I have included only 4 of the 8 phases of the moon that are reported by the Moon Sensor. You will need to modify the example and add the 4 missing phases. Modify the Spanish translations to meet your requirements.
I am a beginner and have just started with Home Assistant and will have to learn how to use the templates. With your example, I hope to achieve it.
Again, thank you for your help.