3 files
This commit is contained in:
+57
@@ -0,0 +1,57 @@
|
|||||||
|
# ha_mcp_backup
|
||||||
|
schema_version: 1
|
||||||
|
domain: automation
|
||||||
|
entity_id: automation.sparkx_i7_deduct_filament_in_spoolman_on_print_complete
|
||||||
|
captured: '2026-10-08T16:34:33.721483+00:00'
|
||||||
|
tool: ha_config_set_automation
|
||||||
|
config:
|
||||||
|
id: '1791477238729'
|
||||||
|
alias: SparkX i7 - Deduct filament in Spoolman on print complete
|
||||||
|
triggers:
|
||||||
|
- trigger: state
|
||||||
|
entity_id: sensor.sparkx_i7_print_status
|
||||||
|
from: printing
|
||||||
|
to: completed
|
||||||
|
conditions:
|
||||||
|
- condition: template
|
||||||
|
value_template: '{{ states(''sensor.sparkx_i7_filament_weight_estimated'') | float(0)
|
||||||
|
> 0 }}'
|
||||||
|
actions:
|
||||||
|
- variables:
|
||||||
|
weight: '{{ states(''sensor.sparkx_i7_filament_weight_estimated'') | float(0)
|
||||||
|
}}'
|
||||||
|
spool_id: '{{ states(''input_text.sparkx_i7_print_spool_latch'') | int(0) }}'
|
||||||
|
- choose:
|
||||||
|
- conditions:
|
||||||
|
condition: template
|
||||||
|
value_template: '{{ spool_id > 0 }}'
|
||||||
|
sequence:
|
||||||
|
- action: spoolman.use_spool_filament
|
||||||
|
data:
|
||||||
|
id: '{{ spool_id | int(0) }}'
|
||||||
|
use_weight: '{{ weight | float(0) }}'
|
||||||
|
- action: input_text.set_value
|
||||||
|
target:
|
||||||
|
entity_id: input_text.sparkx_i7_print_spool_latch
|
||||||
|
data:
|
||||||
|
value: ''
|
||||||
|
- conditions:
|
||||||
|
condition: template
|
||||||
|
value_template: '{{ spool_id <= 0 }}'
|
||||||
|
sequence:
|
||||||
|
- action: notify.persistent_notification
|
||||||
|
data:
|
||||||
|
title: Spoolman deduction skipped
|
||||||
|
message: "Print completed: {{ weight }} g used, but no Spoolman spool was\
|
||||||
|
\ latched for this print \u2014 nothing deducted."
|
||||||
|
- action: notify.mobile_app_francos_ipad
|
||||||
|
data:
|
||||||
|
title: Spoolman deduction skipped
|
||||||
|
message: "Print completed: {{ weight }} g used, but no Spoolman spool was\
|
||||||
|
\ latched for this print \u2014 nothing deducted."
|
||||||
|
- action: notify.mobile_app_sm_f956w
|
||||||
|
data:
|
||||||
|
title: Spoolman deduction skipped
|
||||||
|
message: "Print completed: {{ weight }} g used, but no Spoolman spool was\
|
||||||
|
\ latched for this print \u2014 nothing deducted."
|
||||||
|
mode: single
|
||||||
+53
@@ -0,0 +1,53 @@
|
|||||||
|
# ha_mcp_backup
|
||||||
|
schema_version: 1
|
||||||
|
domain: automation
|
||||||
|
entity_id: automation.sparkx_i7_latch_print_spool_for_spoolman
|
||||||
|
captured: '2026-10-08T16:34:33.495188+00:00'
|
||||||
|
tool: ha_config_set_automation
|
||||||
|
config:
|
||||||
|
id: '1791477238762'
|
||||||
|
alias: SparkX i7 - Latch print spool for Spoolman
|
||||||
|
triggers:
|
||||||
|
- trigger: state
|
||||||
|
entity_id: sensor.sparkx_i7_print_status
|
||||||
|
to: printing
|
||||||
|
- trigger: state
|
||||||
|
entity_id: sensor.sparkx_i7_active_filament_slot
|
||||||
|
- trigger: state
|
||||||
|
entity_id:
|
||||||
|
- sensor.sparkx_i7_cfs_box_1_slot_1_color
|
||||||
|
- sensor.sparkx_i7_cfs_box_1_slot_2_color
|
||||||
|
- sensor.sparkx_i7_cfs_box_1_slot_3_color
|
||||||
|
- sensor.sparkx_i7_cfs_box_1_slot_4_color
|
||||||
|
conditions:
|
||||||
|
- condition: state
|
||||||
|
entity_id: sensor.sparkx_i7_print_status
|
||||||
|
state: printing
|
||||||
|
actions:
|
||||||
|
- choose:
|
||||||
|
- conditions:
|
||||||
|
condition: template
|
||||||
|
value_template: '{{ trigger.entity_id == ''sensor.sparkx_i7_print_status''
|
||||||
|
}}'
|
||||||
|
sequence:
|
||||||
|
- action: input_text.set_value
|
||||||
|
target:
|
||||||
|
entity_id: input_text.sparkx_i7_print_spool_latch
|
||||||
|
data:
|
||||||
|
value: ''
|
||||||
|
- variables:
|
||||||
|
spool_id: "{%- set slot = states('sensor.sparkx_i7_active_filament_slot') -%}\n\
|
||||||
|
{%- set ce = 'sensor.sparkx_i7_cfs_' ~ (slot | lower | replace(' ', '_'))\
|
||||||
|
\ ~ '_color' -%}\n{%- set color = states(ce) | replace('#', '') | lower -%}\n\
|
||||||
|
{%- set ns = namespace(id = '') -%}\n{%- for e in integration_entities('spoolman')\
|
||||||
|
\ -%}\n {%- if e.endswith('_color_hex') and (states(e) | lower) == color\
|
||||||
|
\ -%}\n {%- set ns.id = states(e[:-10] ~ '_id') -%}\n {%- endif -%}\n\
|
||||||
|
{%- endfor -%}\n{{ ns.id }}"
|
||||||
|
- condition: template
|
||||||
|
value_template: '{{ spool_id not in ['''', ''unknown'', ''unavailable''] }}'
|
||||||
|
- action: input_text.set_value
|
||||||
|
target:
|
||||||
|
entity_id: input_text.sparkx_i7_print_spool_latch
|
||||||
|
data:
|
||||||
|
value: '{{ spool_id }}'
|
||||||
|
mode: single
|
||||||
@@ -3949,3 +3949,5 @@
|
|||||||
{"timestamp": "2026-10-08T16:31:30.967369+00:00", "tool_name": "ha_config_set_helper", "parameters": {"helper_type": "input_text", "name": "SparkX i7 Print Spool Latch", "helper_id": null, "entry_id": null, "subentry_type": null, "subentry_id": null, "show_advanced_options": false, "icon": null, "area_id": null, "labels": null, "min_value": null, "max_value": null, "step": null, "unit_of_measurement": null, "options": null, "initial": null, "mode": null, "has_date": null, "has_time": null, "restore": null, "duration": null, "monday": null, "tuesday": null, "wednesday": null, "thursday": null, "friday": null, "saturday": null, "sunday": null, "latitude": null, "longitude": null, "radius": null, "passive": null, "user_id": null, "device_trackers": null, "picture": null, "tag_id": null, "description": null, "category": null, "config": null, "wait": true, "action": "create", "MandatoryBPS": false, "BestPracticeKey": null}, "execution_time_ms": 119.4601058959961, "success": true, "error_message": null, "response_size_bytes": 320, "user_context": null}
|
{"timestamp": "2026-10-08T16:31:30.967369+00:00", "tool_name": "ha_config_set_helper", "parameters": {"helper_type": "input_text", "name": "SparkX i7 Print Spool Latch", "helper_id": null, "entry_id": null, "subentry_type": null, "subentry_id": null, "show_advanced_options": false, "icon": null, "area_id": null, "labels": null, "min_value": null, "max_value": null, "step": null, "unit_of_measurement": null, "options": null, "initial": null, "mode": null, "has_date": null, "has_time": null, "restore": null, "duration": null, "monday": null, "tuesday": null, "wednesday": null, "thursday": null, "friday": null, "saturday": null, "sunday": null, "latitude": null, "longitude": null, "radius": null, "passive": null, "user_id": null, "device_trackers": null, "picture": null, "tag_id": null, "description": null, "category": null, "config": null, "wait": true, "action": "create", "MandatoryBPS": false, "BestPracticeKey": null}, "execution_time_ms": 119.4601058959961, "success": true, "error_message": null, "response_size_bytes": 320, "user_context": null}
|
||||||
{"timestamp": "2026-10-08T16:34:00.084894+00:00", "tool_name": "ha_config_set_automation", "parameters": {"config": {"alias": "SparkX i7 - Deduct filament in Spoolman on print complete", "triggers": [{"trigger": "state", "entity_id": "sensor.sparkx_i7_print_status", "from": "printing", "to": "completed"}], "conditions": [{"condition": "template", "value_template": "{{ states('sensor.sparkx_i7_filament_weight_estimated') | float(0) > 0 }}"}], "actions": [{"variables": {"weight": "{{ states('sensor.sparkx_i7_filament_weight_estimated') | float(0) }}", "spool_id": "{{ states('input_text.sparkx_i7_print_spool_latch') | int(0) }}"}}, {"choose": [{"conditions": {"condition": "[REDACTED]", "value_template": "[REDACTED]"}, "sequence": ["[REDACTED]", "[REDACTED]"]}, {"conditions": {"condition": "[REDACTED]", "value_template": "[REDACTED]"}, "sequence": ["[REDACTED]", "[REDACTED]", "[REDACTED]"]}]}], "mode": "single"}, "identifier": null, "python_transform": null, "config_hash": null, "take_control_of_blueprint": false, "category": null, "wait": true, "enabled": null, "run_actions": false, "MandatoryBPS": false, "BestPracticeKey": null}, "execution_time_ms": 1374.201774597168, "success": true, "error_message": null, "response_size_bytes": 6517, "user_context": null}
|
{"timestamp": "2026-10-08T16:34:00.084894+00:00", "tool_name": "ha_config_set_automation", "parameters": {"config": {"alias": "SparkX i7 - Deduct filament in Spoolman on print complete", "triggers": [{"trigger": "state", "entity_id": "sensor.sparkx_i7_print_status", "from": "printing", "to": "completed"}], "conditions": [{"condition": "template", "value_template": "{{ states('sensor.sparkx_i7_filament_weight_estimated') | float(0) > 0 }}"}], "actions": [{"variables": {"weight": "{{ states('sensor.sparkx_i7_filament_weight_estimated') | float(0) }}", "spool_id": "{{ states('input_text.sparkx_i7_print_spool_latch') | int(0) }}"}}, {"choose": [{"conditions": {"condition": "[REDACTED]", "value_template": "[REDACTED]"}, "sequence": ["[REDACTED]", "[REDACTED]"]}, {"conditions": {"condition": "[REDACTED]", "value_template": "[REDACTED]"}, "sequence": ["[REDACTED]", "[REDACTED]", "[REDACTED]"]}]}], "mode": "single"}, "identifier": null, "python_transform": null, "config_hash": null, "take_control_of_blueprint": false, "category": null, "wait": true, "enabled": null, "run_actions": false, "MandatoryBPS": false, "BestPracticeKey": null}, "execution_time_ms": 1374.201774597168, "success": true, "error_message": null, "response_size_bytes": 6517, "user_context": null}
|
||||||
{"timestamp": "2026-10-08T16:34:00.733867+00:00", "tool_name": "ha_config_set_automation", "parameters": {"config": {"alias": "SparkX i7 - Latch print spool for Spoolman", "triggers": [{"trigger": "state", "entity_id": "sensor.sparkx_i7_print_status", "to": "printing"}, {"trigger": "state", "entity_id": "sensor.sparkx_i7_active_filament_slot"}, {"trigger": "state", "entity_id": ["sensor.sparkx_i7_cfs_box_1_slot_1_color", "sensor.sparkx_i7_cfs_box_1_slot_2_color", "sensor.sparkx_i7_cfs_box_1_slot_3_color", "sensor.sparkx_i7_cfs_box_1_slot_4_color"]}], "conditions": [{"condition": "state", "entity_id": "sensor.sparkx_i7_print_status", "state": "printing"}], "actions": [{"choose": [{"conditions": {"condition": "[REDACTED]", "value_template": "[REDACTED]"}, "sequence": ["[REDACTED]"]}]}, {"variables": {"spool_id": "{%- set slot = states('sensor.sparkx_i7_active_filament_slot') -%}\n{%- set ce = 'sensor.sparkx_i7_cfs_' ~ (slot | lower | replace(' ', '_')) ~ '_color' -%}\n{%- set color = states(ce) | replace('#', '') | lower -%}\n{%- set ns = namespace(id = '') -%}\n{%- for e in integration_entities('spoolman') -%}\n {%- if e.endswith('_color_hex') and (states(e) | lower) == color -%}\n {%- set ns.id = states(e[:-10] ~ '_id') -%}\n {%- endif -%}\n{%- endfor -%}\n{{ ns.id }}"}}, {"condition": "template", "value_template": "{{ spool_id not in ['', 'unknown', 'unavailable'] }}"}, {"action": "input_text.set_value", "target": {"entity_id": "input_text.sparkx_i7_print_spool_latch"}, "data": {"value": "{{ spool_id }}"}}], "mode": "single"}, "identifier": null, "python_transform": null, "config_hash": null, "take_control_of_blueprint": false, "category": null, "wait": true, "enabled": null, "run_actions": false, "MandatoryBPS": false, "BestPracticeKey": null}, "execution_time_ms": 2021.4054584503174, "success": true, "error_message": null, "response_size_bytes": 1773, "user_context": null}
|
{"timestamp": "2026-10-08T16:34:00.733867+00:00", "tool_name": "ha_config_set_automation", "parameters": {"config": {"alias": "SparkX i7 - Latch print spool for Spoolman", "triggers": [{"trigger": "state", "entity_id": "sensor.sparkx_i7_print_status", "to": "printing"}, {"trigger": "state", "entity_id": "sensor.sparkx_i7_active_filament_slot"}, {"trigger": "state", "entity_id": ["sensor.sparkx_i7_cfs_box_1_slot_1_color", "sensor.sparkx_i7_cfs_box_1_slot_2_color", "sensor.sparkx_i7_cfs_box_1_slot_3_color", "sensor.sparkx_i7_cfs_box_1_slot_4_color"]}], "conditions": [{"condition": "state", "entity_id": "sensor.sparkx_i7_print_status", "state": "printing"}], "actions": [{"choose": [{"conditions": {"condition": "[REDACTED]", "value_template": "[REDACTED]"}, "sequence": ["[REDACTED]"]}]}, {"variables": {"spool_id": "{%- set slot = states('sensor.sparkx_i7_active_filament_slot') -%}\n{%- set ce = 'sensor.sparkx_i7_cfs_' ~ (slot | lower | replace(' ', '_')) ~ '_color' -%}\n{%- set color = states(ce) | replace('#', '') | lower -%}\n{%- set ns = namespace(id = '') -%}\n{%- for e in integration_entities('spoolman') -%}\n {%- if e.endswith('_color_hex') and (states(e) | lower) == color -%}\n {%- set ns.id = states(e[:-10] ~ '_id') -%}\n {%- endif -%}\n{%- endfor -%}\n{{ ns.id }}"}}, {"condition": "template", "value_template": "{{ spool_id not in ['', 'unknown', 'unavailable'] }}"}, {"action": "input_text.set_value", "target": {"entity_id": "input_text.sparkx_i7_print_spool_latch"}, "data": {"value": "{{ spool_id }}"}}], "mode": "single"}, "identifier": null, "python_transform": null, "config_hash": null, "take_control_of_blueprint": false, "category": null, "wait": true, "enabled": null, "run_actions": false, "MandatoryBPS": false, "BestPracticeKey": null}, "execution_time_ms": 2021.4054584503174, "success": true, "error_message": null, "response_size_bytes": 1773, "user_context": null}
|
||||||
|
{"timestamp": "2026-10-08T16:34:33.618437+00:00", "tool_name": "ha_config_set_automation", "parameters": {"config": null, "identifier": "automation.sparkx_i7_latch_print_spool_for_spoolman", "python_transform": "config['triggers'][0]['id'] = 'print_started'; config['actions'][0]['choose'][0]['conditions'] = {'condition': 'trigger', 'id': 'print_started'}", "config_hash": null, "take_control_of_blueprint": false, "category": null, "wait": true, "enabled": null, "run_actions": false, "MandatoryBPS": false, "BestPracticeKey": null}, "execution_time_ms": 1.9414424896240234, "success": false, "error_message": "{\n \"success\": false,\n \"error\": {\n \"code\": \"VALIDATION_INVALID_PARAMETER\",\n \"message\": \"config_hash is required for python_transform\",\n \"suggestion\": \"Call ha_config_get_automation() first\",\n \"suggestions\": [\n \"Call ha_config_get_automation() first\",\n \"Use the config_hash from that response\",\n \"For Home Assistant best-practice guidance, call ha_get_skill_guide() to read SKILL.md, then the reference file its table points to, before retrying.\"\n ]\n },\n \"action\": \"python_transform\",\n \"identifier\": \"automation.sparkx_i7_latch_print_spool_for_spoolman\"\n}", "response_size_bytes": null, "user_context": null}
|
||||||
|
{"timestamp": "2026-10-08T16:34:33.728307+00:00", "tool_name": "ha_config_set_automation", "parameters": {"config": null, "identifier": "automation.sparkx_i7_deduct_filament_in_spoolman_on_print_complete", "python_transform": "config['conditions'] = [{'condition': 'numeric_state', 'entity_id': 'sensor.sparkx_i7_filament_weight_estimated', 'above': 0}]", "config_hash": null, "take_control_of_blueprint": false, "category": null, "wait": true, "enabled": null, "run_actions": false, "MandatoryBPS": false, "BestPracticeKey": null}, "execution_time_ms": 0.14829635620117188, "success": false, "error_message": "{\n \"success\": false,\n \"error\": {\n \"code\": \"VALIDATION_INVALID_PARAMETER\",\n \"message\": \"config_hash is required for python_transform\",\n \"suggestion\": \"Call ha_config_get_automation() first\",\n \"suggestions\": [\n \"Call ha_config_get_automation() first\",\n \"Use the config_hash from that response\",\n \"For Home Assistant best-practice guidance, call ha_get_skill_guide() to read SKILL.md, then the reference file its table points to, before retrying.\"\n ]\n },\n \"action\": \"python_transform\",\n \"identifier\": \"automation.sparkx_i7_deduct_filament_in_spoolman_on_print_complete\"\n}", "response_size_bytes": null, "user_context": null}
|
||||||
|
|||||||
Reference in New Issue
Block a user