Debian Codegraph @

intents/responses/ca/HassGetWeather.yaml

raw
1 language: ca
2 responses:
3 intents:
4 HassGetWeather:
5 default: >
6 {% set weather_condition = {
7 'clear': 'Cel clar',
8 'clear-night': 'Cel clar',
9 'cloudy': 'Cel ennuvolat',
10 'exceptional': 'Clima excepcionalment advers',
11 'fog': 'Boira',
12 'hail': 'Precipitacions de calamarsa',
13 'lightning': 'Tempesta',
14 'lightning-rainy': 'Pluja i tempesta',
15 'partlycloudy': 'Cels parcialment ennuvolats',
16 'pouring': 'Plugim',
17 'rainy': 'Pluja',
18 'snowy': 'Precipitacions de neu',
19 'snowy-rainy': 'Precipitacions de aiguaneu',
20 'sunny': 'Sol',
21 'windy': 'Vent',
22 'windy-variant': 'Vent i núvols'
23 } %}
24 {% set weather_condition = weather_condition.get((state.state | string).lower(), "") %}
25 {% set temperature_raw = state.attributes.get('temperature') | float %}
26 {% set temperature = temperature_raw | abs | round(1) | replace('.0', '') | replace('.',',') %}
27 {% set temperature_units = 'grau' if temperature_raw | abs == 1 else 'graus' %}
28 {% set temperature_negative = 'sota zero' if temperature_raw < 0 else '' %}
29 {{ weather_condition }}, amb una temperatura de {{ temperature }} {{ temperature_units }} {{ temperature_negative }}