这是英超联赛匹配的公告自动化。问题是:当天下午6点有3场比赛,但只有即将到来的比赛的宣布即将到来。
有没有办法宣布所有即将到来的比赛?
description: EPL match trigger: * platform: time at: ‘18:00:00’ condition: * condition: template value_template: >- {% set event_remaining = (as_timestamp(state_attr(‘calendar.epl’,‘start_time’)) * as_timestamp(now()))/3600 %} {{ event_remaining < 12 and event_remaining >= 0 }} action: * service: notify.telegrambot data_template: message: > {% set starttime = state_attr(‘calendar.epl’,‘start_time’) %} {% set datetime = strptime(starttime,’%Y-%m-%d %H:%M:%S’) -%} Match {{state_attr(‘calendar.epl’,‘message’) }} time {{datetime.hour}} hour {{datetime.minute}} minute