configuration.yaml
This commit is contained in:
1 parent
2df0df86f3
commit
3fac27a20d
1 file changed
+14
-1
+14
-1
@@ -19,7 +19,20 @@ shell_command:
|
|||||||
ipv6_static_nogw: "sh /config/netfix_ipv6.sh"
|
ipv6_static_nogw: "sh /config/netfix_ipv6.sh"
|
||||||
# Keep the CFS Lite bar colours in the Grafana filament dashboard in sync with the
|
# 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
|
# 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 Commands (OctoPrint nozzle extrusion)
|
||||||
rest_command:
|
rest_command:
|
||||||
|
|||||||
Reference in new issue
Block a user