This commit is contained in:
Home Assistant Version Control
2026-10-16 20:02:39 +00:00
parent 1210fde1ff
commit 698ee960e7
3 changed files with 18 additions and 10 deletions
+2
View File
@@ -4743,3 +4743,5 @@
{"timestamp": "2026-10-16T19:58:34.016092+00:00", "tool_name": "ha_call_service", "parameters": {"domain": "shell_command", "service": "grafana_colour_sync", "entity_id": null, "data": null, "return_response": false, "wait": true, "verbose": false, "result_fields": null, "result_attribute_keys": null, "ws_command": null}, "execution_time_ms": 437.23344802856445, "success": true, "error_message": null, "response_size_bytes": 201, "user_context": null}
{"timestamp": "2026-10-16T19:58:52.400901+00:00", "tool_name": "ha_get_logs", "parameters": {"source": "error_log", "limit": 20, "search": "shell_command", "order": "newest", "hours_back": 1, "entity_id": null, "end_time": null, "offset": 0, "compact": true, "level": null, "structured": false, "top_n": null, "slug": null}, "execution_time_ms": 783.6616039276123, "success": true, "error_message": null, "response_size_bytes": 2158, "user_context": null}
{"timestamp": "2026-10-16T19:59:15.725993+00:00", "tool_name": "ha_eval_template", "parameters": {"template": "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", "condition": null, "variables": null, "strict": false, "timeout": 3, "report_errors": true}, "execution_time_ms": 284.4884395599365, "success": true, "error_message": null, "response_size_bytes": 905, "user_context": null}
{"timestamp": "2026-10-16T20:02:37.594989+00:00", "tool_name": "ha_call_service", "parameters": {"domain": "shell_command", "service": "reload", "entity_id": null, "data": null, "return_response": false, "wait": true, "verbose": false, "result_fields": null, "result_attribute_keys": null, "ws_command": null}, "execution_time_ms": 252.09712982177734, "success": true, "error_message": null, "response_size_bytes": 175, "user_context": null}
{"timestamp": "2026-10-16T20:02:38.964295+00:00", "tool_name": "ha_call_service", "parameters": {"domain": "shell_command", "service": "colour_sync_probe", "entity_id": null, "data": null, "return_response": false, "wait": true, "verbose": false, "result_fields": null, "result_attribute_keys": null, "ws_command": null}, "execution_time_ms": 80.16705513000488, "success": true, "error_message": null, "response_size_bytes": 197, "user_context": null}
+6
View File
@@ -21,6 +21,7 @@ shell_command:
# Spoolman location of each slot. Script reads its Grafana token from /config/.colour-sync.token
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 ') -%}
@@ -32,6 +33,11 @@ shell_command:
{%- endfor -%}
{{ ns.items | tojson }}'
>> /config/.colour-sync.log 2>&1
# TEMPORARY diagnostic - remove once colour sync is working.
colour_sync_probe: >-
python3 -c "import sys,json;open('/config/.probe.txt','w').write(json.dumps(sys.argv[1:]))"
'{{ 1 + 1 }}'
>> /config/.probe.log 2>&1
# Rest Commands (OctoPrint nozzle extrusion)
rest_command:
+10 -10
View File
@@ -4,7 +4,7 @@
"state": "ON",
"led_brightness": 100,
"countdown_to_turn_off": 0,
"voltage": 120.2,
"voltage": 120.3,
"countdown_to_turn_on": 0,
"ac_frequency": 60,
"power_factor": 0.11,
@@ -45,10 +45,10 @@
"state": "ON",
"led_brightness": 100,
"countdown_to_turn_off": 0,
"voltage": 119.6,
"voltage": 120.1,
"countdown_to_turn_on": 0,
"energy": 110.7,
"power_factor": 0.3,
"power_factor": 0.2,
"ac_frequency": 60,
"update": {
"state": "idle",
@@ -74,7 +74,7 @@
"led_brightness": 100,
"countdown_to_turn_off": 0,
"countdown_to_turn_on": 0,
"voltage": 118.1,
"voltage": 118.8,
"state": "ON",
"ac_frequency": 60,
"energy": 224.73,
@@ -95,13 +95,13 @@
"led_brightness": 100,
"countdown_to_turn_off": 0,
"countdown_to_turn_on": 0,
"voltage": 120.2,
"energy": 105.69,
"voltage": 119.9,
"energy": 105.7,
"state": "ON",
"power": 71.7,
"current": 0.71,
"power": 57.8,
"current": 0.59,
"ac_frequency": 60,
"power_factor": 0.87,
"power_factor": 0.81,
"update": {
"state": "idle",
"installed_version": 268513381,
@@ -114,7 +114,7 @@
},
"0xffffb40e060895b3": {
"state": "ON",
"voltage": 118.3,
"voltage": 119.6,
"ac_frequency": 60,
"energy": 15.42,
"current": 0.01,