Voice Assist - Accuweather Integration

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 

Thank you.

Hello

You can create a custom response with traduction

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] }}

Sorry, I forgot to reply!
Thank you for the suggestion, it works :slight_smile:

1 Like