.ha_mcp/logs/mcp_usage.jsonl, automations.yaml
This commit is contained in:
@@ -3522,3 +3522,4 @@
|
|||||||
{"timestamp": "2026-09-01T19:17:20.997840+00:00", "tool_name": "ha_config_get_automation", "parameters": {"identifier": "automation.blink_shed_motion_notification"}, "execution_time_ms": 492.511510848999, "success": true, "error_message": null, "response_size_bytes": 915, "user_context": null}
|
{"timestamp": "2026-09-01T19:17:20.997840+00:00", "tool_name": "ha_config_get_automation", "parameters": {"identifier": "automation.blink_shed_motion_notification"}, "execution_time_ms": 492.511510848999, "success": true, "error_message": null, "response_size_bytes": 915, "user_context": null}
|
||||||
{"timestamp": "2026-09-01T19:23:25.521856+00:00", "tool_name": "ha_config_set_automation", "parameters": {"config": {"actions": [{"action": "shell_command.cleanup_blink_snapshots"}, {"choose": [{"conditions": ["[REDACTED]"], "sequence": ["[REDACTED]", "[REDACTED]", "[REDACTED]", "[REDACTED]", "[REDACTED]", "[REDACTED]", "[REDACTED]", "[REDACTED]", "[REDACTED]"]}, {"conditions": ["[REDACTED]"], "sequence": ["[REDACTED]", "[REDACTED]", "[REDACTED]", "[REDACTED]", "[REDACTED]", "[REDACTED]", "[REDACTED]", "[REDACTED]", "[REDACTED]"]}, {"conditions": ["[REDACTED]"], "sequence": ["[REDACTED]", "[REDACTED]", "[REDACTED]", "[REDACTED]", "[REDACTED]", "[REDACTED]", "[REDACTED]", "[REDACTED]", "[REDACTED]"]}], "default": [{"delay": {"seconds": "[REDACTED]"}}]}, {"delay": {"seconds": 2}}, {"action": "ai_task.generate_data", "continue_on_error": true, "response_variable": "ai_profile", "data": {"attachments": [{"media_content_id": "[REDACTED]", "media_content_type": "[REDACTED]"}], "entity_id": "ai_task.ollama_ai_task_video", "instructions": "Describe what you see in this image in brief, but make it a very funny. Focus on any people, objects, animals or activities.", "task_name": "Blink Camera Analysis"}}, {"action": "notify.notify", "continue_on_error": true, "data": {"message": "{{ ai_profile.data if ai_profile is defined and 'data' in ai_profile else 'Motion detected, but the AI Task integration failed to return a response.' }}", "title": "{{ title }}"}}, {"action": "persistent_notification.create", "data": {"message": "{{ ai_profile.data if ai_profile is defined and 'data' in ai_profile else 'Motion detected, but the AI Task integration failed to return a response.' }}\n", "notification_id": "{{ notification_id }}", "title": "{{ title }}"}}], "alias": "Blink Shed Motion Notification", "description": "Sends a notification when motion is detected by any Blink camera, capturing a snapshot and analyzing it with AI for the description.", "id": "ai_agent_auto_1784596277269", "max": 10, "mode": "queued", "triggers": [{"entity_id": "binary_sensor.blink_backyard_shed_motion", "id": "shed", "to": "on", "trigger": "state"}, {"entity_id": "binary_sensor.blink_backyard_tree_motion", "id": "tree", "to": "on", "trigger": "state"}, {"entity_id": "binary_sensor.blink_front_motion", "id": "front", "to": "on", "trigger": "state"}]}, "identifier": "automation.blink_shed_motion_notification", "python_transform": null, "config_hash": null, "category": null, "wait": true, "MandatoryBPS": false, "BestPracticeKey": null}, "execution_time_ms": 468.1861400604248, "success": true, "error_message": null, "response_size_bytes": 182, "user_context": null}
|
{"timestamp": "2026-09-01T19:23:25.521856+00:00", "tool_name": "ha_config_set_automation", "parameters": {"config": {"actions": [{"action": "shell_command.cleanup_blink_snapshots"}, {"choose": [{"conditions": ["[REDACTED]"], "sequence": ["[REDACTED]", "[REDACTED]", "[REDACTED]", "[REDACTED]", "[REDACTED]", "[REDACTED]", "[REDACTED]", "[REDACTED]", "[REDACTED]"]}, {"conditions": ["[REDACTED]"], "sequence": ["[REDACTED]", "[REDACTED]", "[REDACTED]", "[REDACTED]", "[REDACTED]", "[REDACTED]", "[REDACTED]", "[REDACTED]", "[REDACTED]"]}, {"conditions": ["[REDACTED]"], "sequence": ["[REDACTED]", "[REDACTED]", "[REDACTED]", "[REDACTED]", "[REDACTED]", "[REDACTED]", "[REDACTED]", "[REDACTED]", "[REDACTED]"]}], "default": [{"delay": {"seconds": "[REDACTED]"}}]}, {"delay": {"seconds": 2}}, {"action": "ai_task.generate_data", "continue_on_error": true, "response_variable": "ai_profile", "data": {"attachments": [{"media_content_id": "[REDACTED]", "media_content_type": "[REDACTED]"}], "entity_id": "ai_task.ollama_ai_task_video", "instructions": "Describe what you see in this image in brief, but make it a very funny. Focus on any people, objects, animals or activities.", "task_name": "Blink Camera Analysis"}}, {"action": "notify.notify", "continue_on_error": true, "data": {"message": "{{ ai_profile.data if ai_profile is defined and 'data' in ai_profile else 'Motion detected, but the AI Task integration failed to return a response.' }}", "title": "{{ title }}"}}, {"action": "persistent_notification.create", "data": {"message": "{{ ai_profile.data if ai_profile is defined and 'data' in ai_profile else 'Motion detected, but the AI Task integration failed to return a response.' }}\n", "notification_id": "{{ notification_id }}", "title": "{{ title }}"}}], "alias": "Blink Shed Motion Notification", "description": "Sends a notification when motion is detected by any Blink camera, capturing a snapshot and analyzing it with AI for the description.", "id": "ai_agent_auto_1784596277269", "max": 10, "mode": "queued", "triggers": [{"entity_id": "binary_sensor.blink_backyard_shed_motion", "id": "shed", "to": "on", "trigger": "state"}, {"entity_id": "binary_sensor.blink_backyard_tree_motion", "id": "tree", "to": "on", "trigger": "state"}, {"entity_id": "binary_sensor.blink_front_motion", "id": "front", "to": "on", "trigger": "state"}]}, "identifier": "automation.blink_shed_motion_notification", "python_transform": null, "config_hash": null, "category": null, "wait": true, "MandatoryBPS": false, "BestPracticeKey": null}, "execution_time_ms": 468.1861400604248, "success": true, "error_message": null, "response_size_bytes": 182, "user_context": null}
|
||||||
{"timestamp": "2026-09-01T19:24:51.892788+00:00", "tool_name": "ha_config_get_automation", "parameters": {"identifier": "automation.blink_shed_motion_notification"}, "execution_time_ms": 264.93144035339355, "success": true, "error_message": null, "response_size_bytes": 4475, "user_context": null}
|
{"timestamp": "2026-09-01T19:24:51.892788+00:00", "tool_name": "ha_config_get_automation", "parameters": {"identifier": "automation.blink_shed_motion_notification"}, "execution_time_ms": 264.93144035339355, "success": true, "error_message": null, "response_size_bytes": 4475, "user_context": null}
|
||||||
|
{"timestamp": "2026-09-01T19:26:16.421893+00:00", "tool_name": "ha_config_set_automation", "parameters": {"config": null, "identifier": "automation.blink_shed_motion_notification", "python_transform": "config['triggers'].append({'trigger': 'state', 'entity_id': 'binary_sensor.blink_garage_side_motion', 'to': 'on', 'id': 'garage'});\nconfig['actions'][1]['choose'].append({'conditions': [{'condition': 'trigger', 'id': 'garage'}], 'sequence': [{'action': 'switch.turn_on', 'target': {'entity_id': 'switch.garage_side_refresh_snapshot'}}, {'delay': {'seconds': 20}}, {'action': 'homeassistant.update_entity', 'target': {'entity_id': 'camera.garage_side'}}, {'delay': {'seconds': 3}}, {'variables': {'snapshot_filename': \"blink_garage_{{ now().strftime('%Y%m%d_%H%M%S') }}.jpg\"}}, {'variables': {'notification_id': \"blink_garage_{{ now().strftime('%Y%m%d_%H%M%S_%f') }}\"}}, {'variables': {'title': 'Motion Detected - Garage Side'}}, {'action': 'camera.snapshot', 'target': {'entity_id': 'camera.blink_garage_side'}, 'data': {'filename': '/media/{{ snapshot_filename }}'}}, {'action': 'camera.snapshot', 'target': {'entity_id': 'camera.blink_garage_side'}, 'data': {'filename': '/config/www/{{ snapshot_filename }}'}}]})", "config_hash": "3673f1b502aa5662", "category": null, "wait": true, "MandatoryBPS": false, "BestPracticeKey": null}, "execution_time_ms": 6365.530490875244, "success": true, "error_message": null, "response_size_bytes": 1496, "user_context": null}
|
||||||
|
|||||||
@@ -2505,6 +2505,10 @@
|
|||||||
id: front
|
id: front
|
||||||
to: 'on'
|
to: 'on'
|
||||||
trigger: state
|
trigger: state
|
||||||
|
- trigger: state
|
||||||
|
entity_id: binary_sensor.blink_garage_side_motion
|
||||||
|
to: 'on'
|
||||||
|
id: garage
|
||||||
actions:
|
actions:
|
||||||
- action: shell_command.cleanup_blink_snapshots
|
- action: shell_command.cleanup_blink_snapshots
|
||||||
- choose:
|
- choose:
|
||||||
@@ -2598,6 +2602,36 @@
|
|||||||
entity_id: camera.blink_front
|
entity_id: camera.blink_front
|
||||||
data:
|
data:
|
||||||
filename: /config/www/{{ snapshot_filename }}
|
filename: /config/www/{{ snapshot_filename }}
|
||||||
|
- conditions:
|
||||||
|
- condition: trigger
|
||||||
|
id: garage
|
||||||
|
sequence:
|
||||||
|
- action: switch.turn_on
|
||||||
|
target:
|
||||||
|
entity_id: switch.garage_side_refresh_snapshot
|
||||||
|
- delay:
|
||||||
|
seconds: 20
|
||||||
|
- action: homeassistant.update_entity
|
||||||
|
target:
|
||||||
|
entity_id: camera.garage_side
|
||||||
|
- delay:
|
||||||
|
seconds: 3
|
||||||
|
- variables:
|
||||||
|
snapshot_filename: blink_garage_{{ now().strftime('%Y%m%d_%H%M%S') }}.jpg
|
||||||
|
- variables:
|
||||||
|
notification_id: blink_garage_{{ now().strftime('%Y%m%d_%H%M%S_%f') }}
|
||||||
|
- variables:
|
||||||
|
title: Motion Detected - Garage Side
|
||||||
|
- action: camera.snapshot
|
||||||
|
target:
|
||||||
|
entity_id: camera.blink_garage_side
|
||||||
|
data:
|
||||||
|
filename: /media/{{ snapshot_filename }}
|
||||||
|
- action: camera.snapshot
|
||||||
|
target:
|
||||||
|
entity_id: camera.blink_garage_side
|
||||||
|
data:
|
||||||
|
filename: /config/www/{{ snapshot_filename }}
|
||||||
default:
|
default:
|
||||||
- delay:
|
- delay:
|
||||||
seconds: 2
|
seconds: 2
|
||||||
|
|||||||
Reference in New Issue
Block a user