Sports updates from Assist

This commit is contained in:
2023-07-20 14:24:17 -04:00
parent 1deca47878
commit bb608a05ee
2 changed files with 50 additions and 0 deletions

View File

@ -0,0 +1,15 @@
intent_script:
SportsScore:
speech:
text: >
{% from 'sports.jinja' import sports_pregame, sports_main %}
{% set inhibit = "binary_sensor." + team + "_inhibit" %}
{% set sensor = "sensor." + team %}
{% if is_state(inhibit,'on') %}
I do not have any information about the {{ state_attr(team,'friendly_name') }} at this time.
{% elif states(sensor) in ["NOT_FOUND"] %}
They do not appear to have a game scheduled for today.
{% else %}
{{ sports_pregame(sensor) }}
{{ sports_main(sensor) }}
{% endif %}