I am following a tutorial, and I need to create a markdown card. I am using the same code as the tutorial but I am getting a different result. I have all the required entities, but the card is blank. Can anyone see where I am going wrong please?
here is my code:
<table>
{% for i in range(7) %}
{% set index = i|string %}
{% set meal_date = states("sensor.mealie_day" + index + "_date") %}
{% set meal_name = states("sensor.mealie_day" + index + "_name") %}
{% if meal_date != 'unknown' %}
<tr>
<td>
{{ ['ma','di','wo','do','vr','za','zo'][strptime(meal_date, "%Y-%m-%d").weekday()] }}
</td>
<td> </td>
<td>{{ meal_name }}</td>
</tr>
{% endif %}
{% endfor %}
</table>