From 09c61b04962aff002eb9c708851df563c34a1508 Mon Sep 17 00:00:00 2001 From: Home Assistant Version Control Date: Thu, 15 Oct 2026 13:11:35 +0000 Subject: [PATCH] automations.yaml --- automations.yaml | 2 ++ 1 file changed, 2 insertions(+) diff --git a/automations.yaml b/automations.yaml index b21db414..e4fe6296 100644 --- a/automations.yaml +++ b/automations.yaml @@ -4807,6 +4807,8 @@ {% for p in (state_attr('sensor.sparkx_i7_expected_material_length','material') | default('', true) | string).split(';') %}{% set q = p | trim %}{% if q not in ['','none','unknown','unavailable'] %}{% set mc.list = mc.list + [q] %}{% endif %}{% endfor %} {% set single = (gc.list | length) == 1 %} {% set gcol = gc.list[0] if single else '' %} + {% set aslot = (states('sensor.sparkx_i7_active_filament_slot') | default('', true) | string).split('_')[-1] %} + {% set aslot = aslot if aslot in ['1','2','3','4'] else '' %} {% set rem_g = ([((job_g | float) - (used_g | float)), 0] | max) | round(1) %} {% set ns = namespace(cover=[], below=[], short=[], ok=[], missing=[], loaded=[], match_label='', match_rem=0) %} {% for n in ['1','2','3','4'] %}