This is the announcement Automation of Premier League match. The problem is: at 6pm there were 3 matches that day, but only the announcement of an upcoming match was coming.
Is there a way to announce all upcoming matches?
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