Guest User

Untitled

a guest
Dec 16th, 2023
109
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
YAML 1.81 KB | None | 0 0
  1. alias: Agenda diària
  2. trigger:
  3.   - platform: numeric_state
  4.     entity_id:
  5.      - sensor.endoll_active_power
  6.     above: 0
  7. condition:
  8.   - condition: time
  9.     before: '11:00:00'
  10.     enabled: true
  11.   - condition: state
  12.     entity_id: schedule.horari_nit
  13.     state: 'off'
  14. action:
  15.   - delay:
  16.       hours: 0
  17.       minutes: 8
  18.       seconds: 0
  19.       milliseconds: 0
  20.     enabled: false
  21.   - service: calendar.get_events
  22.     target:
  23.       entity_id: calendar.familia
  24.     data:
  25.       duration:
  26.         hours: 24
  27.         minutes: 0
  28.         seconds: 0
  29.     response_variable: agenda
  30.   - service: tts.cloud_say
  31.     data:
  32.       cache: false
  33.       entity_id: media_player.altaveu_sala
  34.       message: >
  35.        Bon dia.  {% set weather_state = states('weather.aemet_daily') %} {% set
  36.         weather_message = {
  37.           'cloudy': 'Avui estarà ennuvolat.',
  38.           'fog': 'Avui hi haurà boira.',
  39.           'lightning': 'Avui hi haurà tempesta amb llamps.',
  40.           'lightning_rainy': 'Avui hi haurà tempesta amb pluja i llamps.',
  41.           'partly_cloudy': 'Avui estarà parcialment ennuvolat.',
  42.           'pouring': 'Avui hi haurà pluges intenses.',
  43.           'rainy': 'Avui hi haurà pluja.',
  44.           'snowy': 'Avui hi haurà neu.',
  45.           'sunny': 'Avui estarà assolellat.',
  46.         }.get(weather_state, 'Avui no tenim informació meteorològica
  47.         disponible.') %} {{ weather_message }} La temperatura exterior és de {{
  48.         states('sensor.temperatura_exterior') | round(0) }} graus.   {% if
  49.         agenda['calendar.familia'].events|length > 0 %}  {% for event in
  50.         agenda['calendar.familia'].events %} A les {{ as_timestamp(event.start)
  51.         | timestamp_custom('%H:%M', true) }}: hi ha {{ event.summary }}. {%
  52.         endfor %} {% endif %}
  53.       language: ca-ES
  54. mode: single
  55.  
Advertisement
Add Comment
Please, Sign In to add comment