configuration.yaml

This commit is contained in:
Home Assistant Version Control
2026-10-16 19:58:31 +00:00
parent 2df0df86f3
commit 3fac27a20d
+14 -1
View File
@@ -19,7 +19,20 @@ shell_command:
ipv6_static_nogw: "sh /config/netfix_ipv6.sh"
# Keep the CFS Lite bar colours in the Grafana filament dashboard in sync with the
# Spoolman location of each slot. Script reads its Grafana token from /config/.colour-sync.token
grafana_colour_sync: "python3 /config/colour-sync.py --once > /config/.colour-sync.log 2>&1"
grafana_colour_sync: >-
python3 /config/colour-sync.py --once --colours
'{%- set ns = namespace(items=[]) -%}
{%- for s in states.sensor | selectattr('entity_id', 'match', '^sensor[.]spoolman_spool_[0-9]+$') -%}
{%- set loc = (s.attributes.location | default('')) | trim -%}
{%- if loc.lower().startswith('cfs lite ') -%}
{%- set hexv = (s.attributes.filament_color_hex | default('')) | trim -%}
{%- if hexv -%}
{%- set ns.items = ns.items + [[loc, ('#' ~ hexv) if not hexv.startswith('#') else hexv]] -%}
{%- endif -%}
{%- endif -%}
{%- endfor -%}
{{ ns.items | tojson }}'
>> /config/.colour-sync.log 2>&1
# Rest Commands (OctoPrint nozzle extrusion)
rest_command: