Apparently the quotes break things, it's actually a boolean value

This commit is contained in:
2023-06-04 18:30:08 -04:00
parent 71c1f5756b
commit c76e7c131a

View File

@ -17,9 +17,9 @@
"The {{ state_attr(team,'friendly_name') }} had their game postponed today, and it will be played at a later date. "
{% elif (state_attr(team,'team_score') | int) == state_attr(team,'opponent_score') | int %}
"The {{ state_attr(team,'friendly_name') }} tied in their game today against the {{ state_attr(team,'opponent_name') }} by a score of {{ state_attr(team,'team_score') }} to {{ state_attr(team,'opponent_score') }}. "
{% elif state_attr(team,'team_winner') == 'true' %}
{% elif state_attr(team,'team_winner') == true %}
"The {{ state_attr(team,'friendly_name') }} won their game today against the {{ state_attr(team,'opponent_name') }} by a score of {{ state_attr(team,'team_score') }} to {{ state_attr(team,'opponent_score') }}. "
{% elif state_attr(team,'opponent_winner') == 'true' %}
{% elif state_attr(team,'opponent_winner') == true %}
"The {{ state_attr(team,'friendly_name') }} lost their game today against the {{ state_attr(team,'opponent_name') }} by a score of {{ state_attr(team,'opponent_score') }} to {{ state_attr(team,'team_score') }}. "
{% endif %}
{% if state_attr(team,'clock') not in ['postponed','Postponed'] %}
@ -30,9 +30,9 @@
"The {{ state_attr(team,'friendly_name') }} had their game postponed yesterday, and it will be played at a later date. "
{% elif (state_attr(team,'team_score') | int) == state_attr(team,'opponent_score') | int %}
"The {{ state_attr(team,'friendly_name') }} tied in their game yesterday against the {{ state_attr(team,'opponent_name') }} by a score of {{ state_attr(team,'team_score') }} to {{ state_attr(team,'opponent_score') }}. "
{% elif state_attr(team,'team_winner') == 'true' %}
{% elif state_attr(team,'team_winner') == true %}
"The {{ state_attr(team,'friendly_name') }} won their game yesterday against the {{ state_attr(team,'opponent_name') }} by a score of {{ state_attr(team,'team_score') }} to {{ state_attr(team,'opponent_score') }}. "
{% elif state_attr(team,'opponent_winner') == 'true' %}
{% elif state_attr(team,'opponent_winner') == true %}
"The {{ state_attr(team,'friendly_name') }} lost their game yesterday against the {{ state_attr(team,'opponent_name') }} by a score of {{ state_attr(team,'opponent_score') }} to {{ state_attr(team,'team_score') }}. "
{% endif %}
{% if state_attr(team,'clock') not in ['postponed','Postponed'] %}
@ -54,4 +54,4 @@
{% if state_attr(team,'kickoff_in') %}
{{ ('months' or 'weeks') in state_attr(team,'kickoff_in') }}
{% endif %}
{% endmacro %}
{% endmacro %}