Figuring out a way to still use notify groups for this rewrite
This commit is contained in:
@ -4,6 +4,7 @@ script:
|
|||||||
sequence:
|
sequence:
|
||||||
- variables:
|
- variables:
|
||||||
room_services: >-
|
room_services: >-
|
||||||
|
{% if room in areas() %}
|
||||||
{% set alexa_speaker = states.media_player |
|
{% set alexa_speaker = states.media_player |
|
||||||
selectattr('entity_id', 'in', area_entities(room)) |
|
selectattr('entity_id', 'in', area_entities(room)) |
|
||||||
rejectattr('attributes.last_called', 'undefined') |
|
rejectattr('attributes.last_called', 'undefined') |
|
||||||
@ -19,7 +20,8 @@ script:
|
|||||||
list | first %}
|
list | first %}
|
||||||
|
|
||||||
{% set tts = "alexa" if alexa_speaker is defined else "google" %}
|
{% set tts = "alexa" if alexa_speaker is defined else "google" %}
|
||||||
{"area":"{{room}}","alexa_speaker":"{{alexa_speaker|default({}) }}","jarvis_tts":"{{tts}}","google_speaker":"{{google_speaker|default({}) }}"}
|
{% endif %}
|
||||||
|
{"area":"{{room}}","alexa_speaker":"{{alexa_speaker|default({}) }}","jarvis_tts":"{{tts|default("google") }}","google_speaker":"{{google_speaker|default({}) }}"}
|
||||||
- stop: "Services acquired"
|
- stop: "Services acquired"
|
||||||
response_variable: "room_services"
|
response_variable: "room_services"
|
||||||
|
|
||||||
|
Reference in New Issue
Block a user