3 files
This commit is contained in:
@@ -0,0 +1,39 @@
|
||||
# ha_mcp_backup
|
||||
schema_version: 1
|
||||
domain: automation
|
||||
entity_id: automation.3d_print_complete_snapshot
|
||||
captured: '2026-10-03T15:16:22.651698+00:00'
|
||||
tool: ha_config_set_automation
|
||||
config:
|
||||
id: '1787462132503'
|
||||
alias: 3D Print Complete Snapshot - Telegram
|
||||
description: Sends a Telegram photo with a SparkX i7 camera snapshot when a print
|
||||
finishes successfully. Mobile completion notifications are handled by the Creality
|
||||
integration.
|
||||
triggers:
|
||||
- entity_id: sensor.sparkx_i7_print_status
|
||||
from: printing
|
||||
to: completed
|
||||
trigger: state
|
||||
actions:
|
||||
- variables:
|
||||
completion_message: '{% set file = trigger.to_state.attributes.get(''file'',
|
||||
'''') %} {% set name = ''Print'' if file in ['''', none, ''unknown'', ''unavailable'']
|
||||
else file.split(''/'')[-1].replace(''.gcode'', '''') %} {% set seconds = trigger.to_state.attributes.get(''job_time_s'',
|
||||
0) | int(0) %} {{ name }} finished successfully at {{ now().strftime(''%I:%M
|
||||
%p'').lstrip(''0'') }}. Total time: {% if seconds >= 3600 %}{{ seconds //
|
||||
3600 }}h {{ ((seconds % 3600) // 60) }}m {% else %}{{ ((seconds % 3600) //
|
||||
60) }}m{% endif %}'
|
||||
- action: camera.snapshot
|
||||
data:
|
||||
filename: /config/www/sparkx_i7_complete_snapshot.jpg
|
||||
target:
|
||||
entity_id: camera.sparkx_i7_printer_camera
|
||||
- action: telegram_bot.send_photo
|
||||
data:
|
||||
caption: '{{ completion_message }}'
|
||||
file: /config/www/sparkx_i7_complete_snapshot.jpg
|
||||
parse_mode: plain_text
|
||||
target:
|
||||
entity_id: notify.franco
|
||||
mode: single
|
||||
Reference in New Issue
Block a user