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 %}