From c76e7c131ac1b2a8c7e9fad725b2d049ba43282c Mon Sep 17 00:00:00 2001 From: Tony Stork Date: Sun, 4 Jun 2023 18:30:08 -0400 Subject: [PATCH] Apparently the quotes break things, it's actually a boolean value --- custom_templates/sports.jinja | 10 +++++----- 1 file changed, 5 insertions(+), 5 deletions(-) diff --git a/custom_templates/sports.jinja b/custom_templates/sports.jinja index 9e4c65b..fa09b4e 100644 --- a/custom_templates/sports.jinja +++ b/custom_templates/sports.jinja @@ -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 %} \ No newline at end of file +{% endmacro %}