Advertisement
dykandDK

HA - YAML - Markdown card listing library days

Sep 9th, 2023 (edited)
1,430
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
YAML 0.53 KB | None | 0 0
  1. type: markdown
  2. content: |-
  3.   {%- set plan = state_attr("sensor.skole_navn", "ugeplan") %}
  4.   {%- set ugedag = as_timestamp(now()) | timestamp_custom('%w')|int %}
  5.   {%- set list = plan.split('<h3>') %}
  6.   {%- for i in range(6) %}
  7.   {%- if 'idræt' in (list[i]|lower) %}
  8.   {{ list[i][0:16] | replace('<','') | replace('/','') }} - Idræt
  9.   {%- endif %}
  10.   {%- if 'bibliotek' in (list[i]|lower) %}
  11.   {{ list[i][0:16] | replace('<','') | replace('/','') }} - Bibliotek
  12.   {%- endif %}
  13.   {%- endfor %}
  14. title: Dage med bibliotek eller idræt
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement