.ha_mcp/logs/mcp_usage.jsonl, automations.yaml

This commit is contained in:
Home Assistant Version Control
2026-08-23 05:56:15 +00:00
parent c4820f42fe
commit 6dd96be11f
2 changed files with 87 additions and 5 deletions
+86 -5
View File
@@ -3354,30 +3354,111 @@
- action: notify.mobile_app_sm_f956w
data:
title: 3D print early check
message: Print passed the first few layers (Z crossed 1 mm).
message: '{% set f = states(''sensor.octoprint_print_file'') %}{% set file
= ''No file'' if f in [''unknown'', ''unavailable'', ''none''] else f.replace(''.gcode'',
'''') %}{% set pct = states(''sensor.octoprint_print_progress'') | round(0)
| int(0) %}{% set es = states(''sensor.octoprint_elapsed'') | int(0) %}{%
set ts = states(''sensor.octoprint_time_left'') | int(0) %}{% set dt = states(''sensor.octoprint_approximate_completion_time'')
| as_datetime %}{% macro dur(s) -%}{%- if s >= 3600 -%}{{ (s // 3600) }}h
{{ ((s % 3600) // 60) }}m{%- else -%}{{ ((s % 3600) // 60) }}m{%- endif
-%}{%- endmacro %}{% if dt %}{% set fin = ''~'' + as_local(dt).strftime(''%I:%M
%p'').lstrip(''0'') %}{% elif ts > 0 %}{% set fin = ''~'' + (now() + timedelta(seconds=ts)).strftime(''%I:%M
%p'').lstrip(''0'') %}{% else %}{% set fin = ''unknown'' %}{% endif %}
{{ file }}
Progress: {{ pct }}% · Elapsed: {{ dur(es) }} · Left: {{ dur(ts) if ts >
0 else ''unknown'' }}
Est. finish: {{ fin }}'
data:
image: /local/octoprint_snapshot.jpg
- action: notify.mobile_app_motorola_one_vision
data:
title: 3D print early check
message: Print passed the first few layers (Z crossed 1 mm).
message: '{% set f = states(''sensor.octoprint_print_file'') %}{% set file
= ''No file'' if f in [''unknown'', ''unavailable'', ''none''] else f.replace(''.gcode'',
'''') %}{% set pct = states(''sensor.octoprint_print_progress'') | round(0)
| int(0) %}{% set es = states(''sensor.octoprint_elapsed'') | int(0) %}{%
set ts = states(''sensor.octoprint_time_left'') | int(0) %}{% set dt = states(''sensor.octoprint_approximate_completion_time'')
| as_datetime %}{% macro dur(s) -%}{%- if s >= 3600 -%}{{ (s // 3600) }}h
{{ ((s % 3600) // 60) }}m{%- else -%}{{ ((s % 3600) // 60) }}m{%- endif
-%}{%- endmacro %}{% if dt %}{% set fin = ''~'' + as_local(dt).strftime(''%I:%M
%p'').lstrip(''0'') %}{% elif ts > 0 %}{% set fin = ''~'' + (now() + timedelta(seconds=ts)).strftime(''%I:%M
%p'').lstrip(''0'') %}{% else %}{% set fin = ''unknown'' %}{% endif %}
{{ file }}
Progress: {{ pct }}% · Elapsed: {{ dur(es) }} · Left: {{ dur(ts) if ts >
0 else ''unknown'' }}
Est. finish: {{ fin }}'
data:
image: /local/octoprint_snapshot.jpg
- action: notify.mobile_app_francos_ipad
data:
title: 3D print early check
message: Print passed the first few layers (Z crossed 1 mm).
message: '{% set f = states(''sensor.octoprint_print_file'') %}{% set file
= ''No file'' if f in [''unknown'', ''unavailable'', ''none''] else f.replace(''.gcode'',
'''') %}{% set pct = states(''sensor.octoprint_print_progress'') | round(0)
| int(0) %}{% set es = states(''sensor.octoprint_elapsed'') | int(0) %}{%
set ts = states(''sensor.octoprint_time_left'') | int(0) %}{% set dt = states(''sensor.octoprint_approximate_completion_time'')
| as_datetime %}{% macro dur(s) -%}{%- if s >= 3600 -%}{{ (s // 3600) }}h
{{ ((s % 3600) // 60) }}m{%- else -%}{{ ((s % 3600) // 60) }}m{%- endif
-%}{%- endmacro %}{% if dt %}{% set fin = ''~'' + as_local(dt).strftime(''%I:%M
%p'').lstrip(''0'') %}{% elif ts > 0 %}{% set fin = ''~'' + (now() + timedelta(seconds=ts)).strftime(''%I:%M
%p'').lstrip(''0'') %}{% else %}{% set fin = ''unknown'' %}{% endif %}
{{ file }}
Progress: {{ pct }}% · Elapsed: {{ dur(es) }} · Left: {{ dur(ts) if ts >
0 else ''unknown'' }}
Est. finish: {{ fin }}'
data:
image: /local/octoprint_snapshot.jpg
- action: notify.mobile_app_sm_t387w
data:
title: 3D print early check
message: Print passed the first few layers (Z crossed 1 mm).
message: '{% set f = states(''sensor.octoprint_print_file'') %}{% set file
= ''No file'' if f in [''unknown'', ''unavailable'', ''none''] else f.replace(''.gcode'',
'''') %}{% set pct = states(''sensor.octoprint_print_progress'') | round(0)
| int(0) %}{% set es = states(''sensor.octoprint_elapsed'') | int(0) %}{%
set ts = states(''sensor.octoprint_time_left'') | int(0) %}{% set dt = states(''sensor.octoprint_approximate_completion_time'')
| as_datetime %}{% macro dur(s) -%}{%- if s >= 3600 -%}{{ (s // 3600) }}h
{{ ((s % 3600) // 60) }}m{%- else -%}{{ ((s % 3600) // 60) }}m{%- endif
-%}{%- endmacro %}{% if dt %}{% set fin = ''~'' + as_local(dt).strftime(''%I:%M
%p'').lstrip(''0'') %}{% elif ts > 0 %}{% set fin = ''~'' + (now() + timedelta(seconds=ts)).strftime(''%I:%M
%p'').lstrip(''0'') %}{% else %}{% set fin = ''unknown'' %}{% endif %}
{{ file }}
Progress: {{ pct }}% · Elapsed: {{ dur(es) }} · Left: {{ dur(ts) if ts >
0 else ''unknown'' }}
Est. finish: {{ fin }}'
data:
image: /local/octoprint_snapshot.jpg
- action: telegram_bot.send_photo
data:
entity_id: notify.franco
file: /config/www/octoprint_snapshot.jpg
caption: Print passed the first few layers (Z crossed 1 mm).
caption: '{% set f = states(''sensor.octoprint_print_file'') %}{% set file
= ''No file'' if f in [''unknown'', ''unavailable'', ''none''] else f.replace(''.gcode'',
'''') %}{% set pct = states(''sensor.octoprint_print_progress'') | round(0)
| int(0) %}{% set es = states(''sensor.octoprint_elapsed'') | int(0) %}{%
set ts = states(''sensor.octoprint_time_left'') | int(0) %}{% set dt = states(''sensor.octoprint_approximate_completion_time'')
| as_datetime %}{% macro dur(s) -%}{%- if s >= 3600 -%}{{ (s // 3600) }}h
{{ ((s % 3600) // 60) }}m{%- else -%}{{ ((s % 3600) // 60) }}m{%- endif
-%}{%- endmacro %}{% if dt %}{% set fin = ''~'' + as_local(dt).strftime(''%I:%M
%p'').lstrip(''0'') %}{% elif ts > 0 %}{% set fin = ''~'' + (now() + timedelta(seconds=ts)).strftime(''%I:%M
%p'').lstrip(''0'') %}{% else %}{% set fin = ''unknown'' %}{% endif %}
{{ file }}
Progress: {{ pct }}% · Elapsed: {{ dur(es) }} · Left: {{ dur(ts) if ts >
0 else ''unknown'' }}
Est. finish: {{ fin }}'
parse_mode: plain_text
mode: single