3 files
This commit is contained in:
+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-08T17:45:06.877265+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
|
||||
id: print_started
|
||||
- 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: trigger
|
||||
id: print_started
|
||||
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
|
||||
File diff suppressed because one or more lines are too long
Reference in New Issue
Block a user