I am open to ideas on the best way to achieve this. I am using the HA-EPG integration to remind me about live sports events. The integration has a service/action which searches all channels for a phrase and outputs into the response variable as an array/list I am imaginatively calling response.
I have been able to iterate through that response variable to send notifications to my mobile each day with the below YAML
- action: notify.mobile_app_galaxy_s22
metadata: {}
data:
message: >-
The following live motorsport is on today: <p> {% for result in
response.results %} {{ result.start_time }} {{ result.title }}<br> {%
endfor %} </p>
title: Live Motor Racing Alert
This works perfectly. I am then thinking surely it would make sense to pass that information into specifc events in my calandar, obviously I need to use the create_event action and I assume I can call out the variables in the same way I have done above.
What I am struggling with is how to repeat through each item in the response variable, basically what I need to put in the for_each section. I have tried
{{result in response.results}}
and many others. Can anyone suggest what the value should be, if this is even possible? It feels like it should be possible but all I get is malformed errors when I try and save. Is there a better way to do this which I am missing?