Madplan dashboard view + Mealie sensorer + mad_announcement med dagens ret

This commit is contained in:
2026-04-16 19:14:39 +02:00
parent 42930ef2f0
commit 2c4f6c4308
5 changed files with 231 additions and 5 deletions
+34
View File
@@ -0,0 +1,34 @@
- sensor:
- name: "Dagens aftensmad"
unique_id: mealie_dagens_aftensmad
icon: mdi:silverware-fork-knife
state: >
{% set today = now().strftime('%Y-%m-%d') %}
{% set items = state_attr('sensor.mealie_madplan_ugen', 'items') %}
{% if items %}
{% set ns = namespace(meal='Ingen planlagt') %}
{% for item in items %}
{% if item.date == today and item.recipe %}
{% set ns.meal = item.recipe.name %}
{% endif %}
{% endfor %}
{{ ns.meal }}
{% else %}
Ingen planlagt
{% endif %}
- name: "Dagens aftensmad slug"
unique_id: mealie_dagens_aftensmad_slug
state: >
{% set today = now().strftime('%Y-%m-%d') %}
{% set items = state_attr('sensor.mealie_madplan_ugen', 'items') %}
{% if items %}
{% set ns = namespace(slug='') %}
{% for item in items %}
{% if item.date == today and item.recipe %}
{% set ns.slug = item.recipe.slug %}
{% endif %}
{% endfor %}
{{ ns.slug }}
{% else %}
{% endif %}