Advertisement
dykandDK

HA - YAML - Markdown card with Mealie recipe details

Nov 4th, 2024
164
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
YAML 0.76 KB | None | 0 0
  1. type: markdown
  2. content: >
  3.  {% set recipe =  state_attr("sensor.weekly_recipes","recipes")[0] %}
  4.  
  5.   <h2>{{ recipe.recipe_name}}</h2>
  6.  
  7.   <h4><ha-icon icon="mdi:update"></ha-icon> {{
  8.   recipe.recipe_time}}&nbsp;&nbsp;<ha-icon icon="mdi:account-group"></ha-icon>
  9.   {{ recipe.recipe_yield}}</h4>
  10.  
  11.   <b>Fremgangsmåde</b></br>
  12.  
  13.   <ol>
  14.  
  15.   {% for i in recipe.recipe_instructions %}
  16.  
  17.   <li>{{ i.text}}</li>
  18.  
  19.   {% endfor %}
  20.  
  21.   </ol>
  22.  
  23.   <b>Ingredienser</b></br>
  24.  
  25.   <ul>
  26.  
  27.   {% for i in recipe.recipe_ingredients %}
  28.  
  29.   <li>{{ i.note}}</li>
  30.  
  31.   {% endfor %}
  32.  
  33.   </ul>
  34.  
  35.   <b>Links</b></br>
  36.  
  37.   <ul>
  38.  
  39.   <li><a href="{{recipe.recipe_url }}">Se opskrift i Mealie</a></li>
  40.  
  41.   <li><a href="{{recipe.recipe_orgurl }}">Se oprindelig opskrift</a></li>
  42.  
  43.   </ul>
  44.  
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement