Skip to content

Commit

Permalink
Update to v2024.12.3
Browse files Browse the repository at this point in the history
- bugfix script.tts_play
  • Loading branch information
jazzyisj committed Dec 17, 2024
1 parent f1b202b commit 56ce463
Show file tree
Hide file tree
Showing 2 changed files with 4 additions and 4 deletions.
1 change: 1 addition & 0 deletions packages/save_tts_messages.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -165,6 +165,7 @@ script:
{% elif now().day - date.day > 6%} {{ date.strftime('%A, %B %-d at %-I:%M %p') }}
{% else %} {{ date.strftime('%A at %-I:%M %p') }}
{%- endif -%}
continue_on_error: true

- action: script.tts_clear_saved_messages

Expand Down
7 changes: 3 additions & 4 deletions scripts/media/tts/tts_play.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -63,7 +63,8 @@ tts_play:
alert: "{{ alert | default(false) }}"
#MASS redirect tts to active mass player for resume, use first group or first single player found
#HACK to make sure mass always resumes
media_active: "{{ is_state('binary_sensor.speaker', 'on') }}"
#ISSUE subsequent TTS messages play on reg tts player, mass not resumed
media_active: "{{ is_state('binary_sensor.speaker', 'on') and is_state('input_boolean.tts', 'off') }}"
active_player: >
{% if media_active %}
{% set group = expand(state_attr('binary_sensor.speaker', 'entity_id'))
Expand All @@ -74,11 +75,9 @@ tts_play:
| map(attribute='entity_id') | list %}
{% if group[0] is defined or single[0] is defined %}
{{ group[0] if group not in [[], none] else single[0] }}
{% else %} {{ none }}
{% endif %}
{% else %} {{ none }}
{% endif %}
#HACK can't dynamically add so redirect
#HACK can't dynamically add shower speaker so redirect
shower_tts: "{{ is_state('switch.shower_scene', 'on') }}"
shower_player: >
{{ expand('group.tts_media_players')
Expand Down

0 comments on commit 56ce463

Please sign in to comment.