Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- alias: Agenda diària
- trigger:
- - platform: numeric_state
- entity_id:
- - sensor.endoll_active_power
- above: 0
- condition:
- - condition: time
- before: '11:00:00'
- enabled: true
- - condition: state
- entity_id: schedule.horari_nit
- state: 'off'
- action:
- - delay:
- hours: 0
- minutes: 8
- seconds: 0
- milliseconds: 0
- enabled: false
- - service: calendar.get_events
- target:
- entity_id: calendar.familia
- data:
- duration:
- hours: 24
- minutes: 0
- seconds: 0
- response_variable: agenda
- - service: tts.cloud_say
- data:
- cache: false
- entity_id: media_player.altaveu_sala
- message: >
- Bon dia. {% set weather_state = states('weather.aemet_daily') %} {% set
- weather_message = {
- 'cloudy': 'Avui estarà ennuvolat.',
- 'fog': 'Avui hi haurà boira.',
- 'lightning': 'Avui hi haurà tempesta amb llamps.',
- 'lightning_rainy': 'Avui hi haurà tempesta amb pluja i llamps.',
- 'partly_cloudy': 'Avui estarà parcialment ennuvolat.',
- 'pouring': 'Avui hi haurà pluges intenses.',
- 'rainy': 'Avui hi haurà pluja.',
- 'snowy': 'Avui hi haurà neu.',
- 'sunny': 'Avui estarà assolellat.',
- }.get(weather_state, 'Avui no tenim informació meteorològica
- disponible.') %} {{ weather_message }} La temperatura exterior és de {{
- states('sensor.temperatura_exterior') | round(0) }} graus. {% if
- agenda['calendar.familia'].events|length > 0 %} {% for event in
- agenda['calendar.familia'].events %} A les {{ as_timestamp(event.start)
- | timestamp_custom('%H:%M', true) }}: hi ha {{ event.summary }}. {%
- endfor %} {% endif %}
- language: ca-ES
- mode: single
Advertisement
Add Comment
Please, Sign In to add comment