Generalize the weather report
This commit is contained in:
parent
77d71bf7fc
commit
ae69705ab1
|
@ -1,3 +1,4 @@
|
|||
|
||||
- action:
|
||||
- data:
|
||||
group_name: Living room
|
||||
|
@ -29,8 +30,8 @@
|
|||
to: home
|
||||
- action:
|
||||
- data: {}
|
||||
service: script.good_morning
|
||||
alias: Good morning
|
||||
service: script.weather_report
|
||||
alias: Morning weather
|
||||
condition:
|
||||
- after: '6:00'
|
||||
before: '12:00'
|
||||
|
|
14
scripts.yaml
14
scripts.yaml
|
@ -1,5 +1,5 @@
|
|||
sonos_tts:
|
||||
alias: "Sonos TTS script - Testing"
|
||||
alias: "Sonos TTS"
|
||||
sequence:
|
||||
- service: media_player.sonos_snapshot
|
||||
data_template:
|
||||
|
@ -29,13 +29,19 @@ sonos_tts:
|
|||
- service: media_player.sonos_restore
|
||||
data_template:
|
||||
entity_id: "{{ sonos_entity|default('media_player.den') }}"
|
||||
good_morning:
|
||||
alias: Good morning!
|
||||
weather_report:
|
||||
alias: Weather report
|
||||
sequence:
|
||||
- service: script.sonos_tts
|
||||
data_template:
|
||||
message: >-
|
||||
Good morning!
|
||||
{% if now().hour > 17 %}
|
||||
Good evening!
|
||||
{% elif now().hour > 12 %}
|
||||
Good afternoon!
|
||||
{% else %}
|
||||
Good morning!
|
||||
{% endif %}
|
||||
{% if is_state('device_tracker.homeassistant_pixel', 'home') %}
|
||||
Hi Correl!
|
||||
{% endif %}
|
||||
|
|
Loading…
Reference in New Issue