This commit is contained in:
Home Assistant Version Control
2026-10-15 13:24:00 +00:00
parent c85606c96e
commit 90d32d5573
6 changed files with 368 additions and 31 deletions
+10 -9
View File
@@ -245,7 +245,8 @@ spoolman_set_spool_remaining:
fields:
slot:
name: CFS Slot
description: CFS slot number 1-4 - resolves the spool by the slot color hex
description: CFS slot number 1-4 - resolves the spool by the slot's CFS Lite
location
selector:
number:
min: 1
@@ -263,8 +264,8 @@ spoolman_set_spool_remaining:
- variables:
resolved_id: '{% set n = (slot | int(0)) if slot is defined else 0 %}{% if n
>= 1 %}{% set ns = namespace(id='''') %}{% for e in integration_entities(''spoolman'')
%}{% if e.endswith(''_color_hex'') and (state_attr(e[:-10], ''location'') |
default('''', true) | lower) == (''cfs lite '' ~ (n | int)) and ns.id ==
%}{% if e.endswith(''_color_hex'') and (state_attr(e[:-10], ''location'')
| default('''', true) | lower) == (''cfs lite '' ~ (n | int)) and ns.id ==
'''' %}{% set ns.id = states(e[:-10] ~ ''_id'') %}{% endif %}{% endfor %}{{
ns.id }}{% else %}{{ (spool_id | int(0)) if spool_id is defined else 0 }}{%
endif %}'
@@ -286,11 +287,11 @@ spoolman_set_spool_remaining:
message: '{% if slot_n | int >= 1 %}No Spoolman spool matched CFS slot {{
slot_n }} (color {{ states(''sensor.sparkx_i7_cfs_box_1_slot_'' ~ (slot_n
| int) ~ ''_color'') }}) in the CFS Lite location - register a spool with
that color hex and location in Spoolman, then try again.{% else %}No spool
resolved - pass spool_id or a CFS slot 1-4. Nothing was set.{% endif %}'
that CFS Lite location in Spoolman, then try again.{% else %}No spool resolved
- pass spool_id or a CFS slot 1-4. Nothing was set.{% endif %}'
mode: single
description: Sets a Spoolman spool remaining weight from the shared helper input_number.spoolman_set_remaining.
Pass slot (1-4) to resolve the spool by the CFS slot color hex in the CFS Lite
location (no remaining-weight guard, so an exhausted spool can be reset to full),
or pass spool_id directly. Notifies via persistent notification when nothing could
be resolved.
Pass slot (1-4) to resolve the spool by the CFS slot location in the CFS Lite
(no remaining-weight guard, so an exhausted spool can be reset to full), or pass
spool_id directly. Notifies via persistent notification when nothing could be
resolved.