mirror of
https://github.com/CCOSTAN/Home-AssistantConfig.git
synced 2025-02-21 16:44:46 +00:00
Fancy Voice Messages!
This commit is contained in:
parent
f5fb65059a
commit
f366eb1df7
@ -37,5 +37,5 @@
|
|||||||
|
|
||||||
action:
|
action:
|
||||||
- service: script.Voice_notify
|
- service: script.Voice_notify
|
||||||
data_template:
|
data_template:
|
||||||
value1: "Attention. {{ trigger.entity_id.split('.')[1].lower().title() }} is now {{ trigger.to_state.state }}"
|
value1: "{{ trigger.entity_id.split('.')[1]|replace('_', ' ') }} is now {{ trigger.to_state.state }}"
|
@ -40,7 +40,15 @@ voice_notify:
|
|||||||
- service: tts.google_say
|
- service: tts.google_say
|
||||||
entity_id: media_player.whole_house
|
entity_id: media_player.whole_house
|
||||||
data_template:
|
data_template:
|
||||||
message: "{{ value1 }}"
|
message: >
|
||||||
|
{% if now().strftime("%H")|int < 12 %}
|
||||||
|
"Good morning.
|
||||||
|
{% elif now().strftime("%H")|int < 18 %}
|
||||||
|
"Good afternoon.
|
||||||
|
{% else %}
|
||||||
|
"Good evening.
|
||||||
|
{% endif %}
|
||||||
|
{{ value1 }}"
|
||||||
cache: true
|
cache: true
|
||||||
|
|
||||||
|
|
||||||
|
Loading…
x
Reference in New Issue
Block a user