.ha_mcp/logs/mcp_usage.jsonl, automations.yaml
This commit is contained in:
@@ -2136,3 +2136,7 @@
|
||||
{"timestamp": "2026-08-26T04:27:28.199665+00:00", "tool_name": "ha_config_set_automation", "parameters": {"config": null, "identifier": "automation.ikea_bilresa_e2489_dual_button_matter", "python_transform": "\ndef r(o, m):\n if isinstance(o, dict): return {r(k,m):r(v,m) for k,v in o.items()}\n if isinstance(o, list): return [r(i,m) for i in o]\n if isinstance(o, str):\n for k,v in m.items(): o=o.replace(k,v)\n return o\nm={\"sensor.night_light_illuminance\":\"sensor.night_light_illuminance_2\",\"binary_sensor.night_light_occupancy\":\"binary_sensor.night_light_occupancy_2\",\"sensor.bedroom_switch_battery\":\"sensor.bedroom_switch_battery_2\",\"light.bedroom_lamp\":\"light.bedroom_lamp_2\",\"light.office_lamp\":\"light.office_lamp_2\",\"light.night_light\":\"light.night_light_2\"}\nfor k in [\"triggers\",\"actions\",\"conditions\",\"variables\"]: \n if k in config: config[k]=r(config[k],m)\n", "config_hash": "b555305cee4669b9", "category": null, "wait": true, "MandatoryBPS": true, "BestPracticeKey": null}, "execution_time_ms": 55.20176887512207, "success": false, "error_message": "{\n \"success\": false,\n \"error\": {\n \"code\": \"VALIDATION_FAILED\",\n \"message\": \"Expression validation failed: Forbidden node type: FunctionDef \\u2014 use a list comprehension or inline the logic\",\n \"suggestion\": \"Check expression syntax\",\n \"suggestions\": [\n \"Check expression syntax\",\n \"Ensure only allowed operations are used\",\n \"See tool description for allowed operations\",\n \"Expression: \\ndef r(o, m):\\n if isinstance(o, dict): return {r(k,m):r(v,m) for k,v in o.items()}\\n if isinstance(o,...\",\n \"For Home Assistant best-practice guidance, call ha_get_skill_guide(skill='home-assistant-best-practices') and consult the relevant reference file before retrying.\"\n ]\n },\n \"action\": \"python_transform\",\n \"identifier\": \"automation.ikea_bilresa_e2489_dual_button_matter\"\n}", "response_size_bytes": null, "user_context": null}
|
||||
{"timestamp": "2026-08-26T04:30:07.666010+00:00", "tool_name": "ha_config_set_automation", "parameters": {"config": null, "identifier": "automation.alert_thread_node_offline", "python_transform": "config.update(json.loads(json.dumps(config).replace('sensor.night_light_illuminance','sensor.night_light_illuminance_2').replace('binary_sensor.night_light_occupancy','binary_sensor.night_light_occupancy_2').replace('sensor.bedroom_switch_battery','sensor.bedroom_switch_battery_2').replace('light.bedroom_lamp','light.bedroom_lamp_2').replace('light.office_lamp','light.office_lamp_2').replace('light.night_light','light.night_light_2')))", "config_hash": "ed171d2737dbee8d", "category": null, "wait": true, "MandatoryBPS": true, "BestPracticeKey": null}, "execution_time_ms": 189.46218490600586, "success": false, "error_message": "{\n \"success\": false,\n \"error\": {\n \"code\": \"VALIDATION_FAILED\",\n \"message\": \"Expression validation failed: Forbidden method: loads (allowed: append, clear, count, endswith, extend, get, index, insert, items, join, keys, lower, pop, remove, replace, reverse, setdefault, sort, split, startswith, strip, update, upper, values)\",\n \"suggestion\": \"Check expression syntax\",\n \"suggestions\": [\n \"Check expression syntax\",\n \"Ensure only allowed operations are used\",\n \"See tool description for allowed operations\",\n \"Expression: config.update(json.loads(json.dumps(config).replace('sensor.night_light_illuminance','sensor.night_l...\",\n \"For Home Assistant best-practice guidance, call ha_get_skill_guide(skill='home-assistant-best-practices') and consult the relevant reference file before retrying.\"\n ]\n },\n \"action\": \"python_transform\",\n \"identifier\": \"automation.alert_thread_node_offline\"\n}", "response_size_bytes": null, "user_context": null}
|
||||
{"timestamp": "2026-08-26T04:30:09.533588+00:00", "tool_name": "ha_config_set_automation", "parameters": {"config": null, "identifier": "automation.office_desk_lamp_meeting_alert", "python_transform": "config.update(json.loads(json.dumps(config).replace('sensor.night_light_illuminance','sensor.night_light_illuminance_2').replace('binary_sensor.night_light_occupancy','binary_sensor.night_light_occupancy_2').replace('sensor.bedroom_switch_battery','sensor.bedroom_switch_battery_2').replace('light.bedroom_lamp','light.bedroom_lamp_2').replace('light.office_lamp','light.office_lamp_2').replace('light.night_light','light.night_light_2')))", "config_hash": "b3ca17bbb2fa10ed", "category": null, "wait": true, "MandatoryBPS": true, "BestPracticeKey": null}, "execution_time_ms": 173.49696159362793, "success": false, "error_message": "{\n \"success\": false,\n \"error\": {\n \"code\": \"VALIDATION_FAILED\",\n \"message\": \"Expression validation failed: Forbidden method: loads (allowed: append, clear, count, endswith, extend, get, index, insert, items, join, keys, lower, pop, remove, replace, reverse, setdefault, sort, split, startswith, strip, update, upper, values)\",\n \"suggestion\": \"Check expression syntax\",\n \"suggestions\": [\n \"Check expression syntax\",\n \"Ensure only allowed operations are used\",\n \"See tool description for allowed operations\",\n \"Expression: config.update(json.loads(json.dumps(config).replace('sensor.night_light_illuminance','sensor.night_l...\",\n \"For Home Assistant best-practice guidance, call ha_get_skill_guide(skill='home-assistant-best-practices') and consult the relevant reference file before retrying.\"\n ]\n },\n \"action\": \"python_transform\",\n \"identifier\": \"automation.office_desk_lamp_meeting_alert\"\n}", "response_size_bytes": null, "user_context": null}
|
||||
{"timestamp": "2026-08-26T04:31:15.844372+00:00", "tool_name": "ha_config_set_automation", "parameters": {"config": null, "identifier": "automation.alert_thread_node_offline", "python_transform": "config['triggers'][0]['entity_id'] = ['light.bedroom_lamp_2','light.office_lamp_2','sensor.bedroom_switch_battery_2']; config['actions'][0]['data']['message'] = config['actions'][0]['data']['message'].replace('light.bedroom_lamp','light.bedroom_lamp_2').replace('light.office_lamp','light.office_lamp_2').replace('sensor.bedroom_switch_battery','sensor.bedroom_switch_battery_2')", "config_hash": "ed171d2737dbee8d", "category": null, "wait": true, "MandatoryBPS": true, "BestPracticeKey": null}, "execution_time_ms": 1572.608470916748, "success": true, "error_message": null, "response_size_bytes": 60108, "user_context": null}
|
||||
{"timestamp": "2026-08-26T04:31:16.984507+00:00", "tool_name": "ha_config_set_automation", "parameters": {"config": null, "identifier": "automation.office_desk_lamp_meeting_alert", "python_transform": "config['actions'][0]['choose'][0]['sequence'][0]['data']['snapshot_entities'][0] = 'light.office_lamp_2'; config['actions'][0]['choose'][0]['sequence'][1]['target']['entity_id'] = 'light.office_lamp_2'; config['actions'][0]['choose'][1]['sequence'][0]['data']['snapshot_entities'][0] = 'light.office_lamp_2'; config['actions'][0]['choose'][1]['sequence'][1]['target']['entity_id'] = 'light.office_lamp_2'", "config_hash": "b3ca17bbb2fa10ed", "category": null, "wait": true, "MandatoryBPS": true, "BestPracticeKey": null}, "execution_time_ms": 559.0348243713379, "success": true, "error_message": null, "response_size_bytes": 60143, "user_context": null}
|
||||
{"timestamp": "2026-08-26T04:31:19.420574+00:00", "tool_name": "ha_config_set_automation", "parameters": {"config": null, "identifier": "automation.office_teams_webhook_busy_ligh", "python_transform": "config['actions'][0]['choose'][0]['sequence'][0]['target']['entity_id'] = 'light.night_light_2'; config['actions'][0]['choose'][1]['sequence'][0]['target']['entity_id'] = 'light.night_light_2'", "config_hash": "09b42740ea112d26", "category": null, "wait": true, "MandatoryBPS": true, "BestPracticeKey": null}, "execution_time_ms": 691.199541091919, "success": true, "error_message": null, "response_size_bytes": 60380, "user_context": null}
|
||||
{"timestamp": "2026-08-26T04:31:21.356628+00:00", "tool_name": "ha_config_set_automation", "parameters": {"config": null, "identifier": "automation.office_manual_meeting_status_busy_ligh", "python_transform": "config['triggers'][1]['entity_id'] = 'binary_sensor.night_light_occupancy_2'; config['triggers'][2]['entity_id'] = 'binary_sensor.night_light_occupancy_2'; config['actions'][0]['choose'][0]['sequence'][0]['target']['entity_id'] = 'light.night_light_2'; config['actions'][0]['choose'][1]['sequence'][0]['target']['entity_id'] = 'light.night_light_2'; config['actions'][0]['choose'][2]['sequence'][0]['target']['entity_id'] = 'light.night_light_2'; config['actions'][0]['choose'][3]['sequence'][0]['target']['entity_id'] = 'light.night_light_2'", "config_hash": "9df44eab3a8eedb5", "category": null, "wait": true, "MandatoryBPS": true, "BestPracticeKey": null}, "execution_time_ms": 619.4148063659668, "success": true, "error_message": null, "response_size_bytes": 60297, "user_context": null}
|
||||
|
||||
+16
-16
@@ -1615,7 +1615,7 @@
|
||||
}}'
|
||||
sequence:
|
||||
- target:
|
||||
entity_id: light.night_light
|
||||
entity_id: light.night_light_2
|
||||
data:
|
||||
brightness_pct: 100
|
||||
rgb_color:
|
||||
@@ -1629,7 +1629,7 @@
|
||||
}}'
|
||||
sequence:
|
||||
- target:
|
||||
entity_id: light.night_light
|
||||
entity_id: light.night_light_2
|
||||
data:
|
||||
brightness_pct: 20
|
||||
rgb_color:
|
||||
@@ -1647,11 +1647,11 @@
|
||||
entity_id: input_boolean.in_a_meeting
|
||||
trigger: state
|
||||
- id: motion_detected
|
||||
entity_id: binary_sensor.night_light_occupancy
|
||||
entity_id: binary_sensor.night_light_occupancy_2
|
||||
trigger: state
|
||||
to: 'on'
|
||||
- id: motion_cleared
|
||||
entity_id: binary_sensor.night_light_occupancy
|
||||
entity_id: binary_sensor.night_light_occupancy_2
|
||||
trigger: state
|
||||
to: 'off'
|
||||
conditions: []
|
||||
@@ -1677,7 +1677,7 @@
|
||||
- fri
|
||||
sequence:
|
||||
- target:
|
||||
entity_id: light.night_light
|
||||
entity_id: light.night_light_2
|
||||
data:
|
||||
brightness_pct: 100
|
||||
rgb_color:
|
||||
@@ -1705,7 +1705,7 @@
|
||||
- fri
|
||||
sequence:
|
||||
- target:
|
||||
entity_id: light.night_light
|
||||
entity_id: light.night_light_2
|
||||
data:
|
||||
brightness_pct: 20
|
||||
rgb_color:
|
||||
@@ -1734,7 +1734,7 @@
|
||||
- fri
|
||||
sequence:
|
||||
- target:
|
||||
entity_id: light.night_light
|
||||
entity_id: light.night_light_2
|
||||
data:
|
||||
brightness_pct: 30
|
||||
rgb_color:
|
||||
@@ -1763,7 +1763,7 @@
|
||||
- fri
|
||||
sequence:
|
||||
- target:
|
||||
entity_id: light.night_light
|
||||
entity_id: light.night_light_2
|
||||
action: light.turn_off
|
||||
mode: restart
|
||||
- id: '1783738120074'
|
||||
@@ -2226,10 +2226,10 @@
|
||||
data:
|
||||
scene_id: desk_lamp_before_alert
|
||||
snapshot_entities:
|
||||
- light.office_lamp
|
||||
- light.office_lamp_2
|
||||
- action: light.turn_on
|
||||
target:
|
||||
entity_id: light.office_lamp
|
||||
entity_id: light.office_lamp_2
|
||||
data:
|
||||
brightness_pct: 100
|
||||
hs_color:
|
||||
@@ -2251,10 +2251,10 @@
|
||||
data:
|
||||
scene_id: desk_lamp_before_alert
|
||||
snapshot_entities:
|
||||
- light.office_lamp
|
||||
- light.office_lamp_2
|
||||
- action: light.turn_on
|
||||
target:
|
||||
entity_id: light.office_lamp
|
||||
entity_id: light.office_lamp_2
|
||||
data:
|
||||
brightness_pct: 100
|
||||
hs_color:
|
||||
@@ -3526,9 +3526,9 @@
|
||||
(unplug ~30s) the TV Streamer - see decision note 2026-08-23-thread-outage-fix-cold-boot-google-tv-2.'
|
||||
triggers:
|
||||
- entity_id:
|
||||
- light.bedroom_lamp
|
||||
- light.office_lamp
|
||||
- sensor.bedroom_switch_battery
|
||||
- light.bedroom_lamp_2
|
||||
- light.office_lamp_2
|
||||
- sensor.bedroom_switch_battery_2
|
||||
for:
|
||||
minutes: 3
|
||||
to: unavailable
|
||||
@@ -3536,7 +3536,7 @@
|
||||
actions:
|
||||
- action: notify.mobile_app_sm_f956w
|
||||
data:
|
||||
message: '{{ [''light.bedroom_lamp'', ''light.office_lamp'', ''sensor.bedroom_switch_battery'']
|
||||
message: '{{ [''light.bedroom_lamp_2'', ''light.office_lamp_2'', ''sensor.bedroom_switch_battery_2'']
|
||||
| select(''is_state'', ''unavailable'') | join('', '') }} lost the mesh. Fix:
|
||||
unplug/replug the TV Streamer.'
|
||||
title: Thread node offline
|
||||
|
||||
Reference in New Issue
Block a user