Compare commits

..

3 Commits

Author SHA1 Message Date
002919483f Lower-case format period_str 2025-04-16 14:35:14 -04:00
ef548c2df1 Use period_str instead of "inning" 2025-04-16 14:32:28 -04:00
1d60a4df32 Update .HA_VERSION 2025-04-16 14:31:19 -04:00
2 changed files with 3 additions and 3 deletions

View File

@ -1 +1 @@
2025.4.1 2025.4.2

View File

@ -25,10 +25,10 @@
{% macro sports_clock(team) %} {% macro sports_clock(team) %}
{% macro data() %} {% macro data() %}
{% set period_str = period_str(team) %} {% set period_str = period_str(team) %}
{% set game_clock = state_attr(team,'clock') %} {% set game_clock = state_attr(team,'clock') | lower %}
{% if state_attr(team,'league') == 'MLB' %} {% if state_attr(team,'league') == 'MLB' %}
{% set inning_parts = game_clock.split(' ') %} {% set inning_parts = game_clock.split(' ') %}
in the {{ inning_parts[0] ~ ' of the ' ~ inning_parts[1] ~ ' inning' }} in the {{ inning_parts[0] ~ ' of the ' ~ inning_parts[1] ~ ' ' ~ period_str }}
{% else %} {% else %}
{% if ' - ' in game_clock %} {% if ' - ' in game_clock %}
{% set clock_time, quarter = game_clock.split(' - ') %} {% set clock_time, quarter = game_clock.split(' - ') %}