Hello Everybody,
I am trying make Voice Assit to tell me the weather condition from Accuweather Integration.
Everything works fine except for the fact that the condition is in inglish but I would like to have it in Italian.
Please find below the Automation that I created:
alias: Weather
description: ""
trigger:
- platform: conversation
command:
- Condizioni meteo
condition: []
action:
- service: weather.get_forecast
target:
entity_id:
- weather.casa_2
data:
type: daily
response_variable: w
- set_conversation_response: >-
{% set next = w.forecast[0] %}
Ecco le previsioni per {{ 'domani' if day else 'oggi'}}:
La temperatura è di
{{ next.temperature}} gradi e il tempo è {{ next.condition }},
con {{ next.precipitation_probability }} percento di possibilità di
precipitazioni.
mode: single
Example in french ( file /homeassistant/custom_sentences/fr/responses.yaml)
language: fr
responses:
intents:
HassGetWeather:
default: >
{% set weather_condition = {
'clear': 'et le temps est clair',
'clear-night': 'et la nuit est claire',
'cloudy': 'et le temps est nuageux',
'exceptional': 'et les conditions météos sont exceptionnelles',
'fog': 'avec du brouillard',
'hail': 'avec de la grêle',
'lightning': 'avec de l\'orage',
'lightning-rainy': 'avec de l\'orage et de la pluie',
'partlycloudy': 'et un temps partiellement nuageux',
'pouring': 'et une pluie battante',
'rainy': 'et de la pluie',
'snowy': 'et de la neige',
'snowy-rainy': 'avec pluie et neige mêlées',
'sunny': 'et un temps ensoleillé',
'windy': 'avec un temps venteux',
'windy-variant': 'et un temps variable et venteux'
} %}
{% set weatherstate = states('weather.maison') %}
{{ state.attributes.get('temperature') }} {{ "degrés" }} {{ weather_condition[weatherstate] }}