diff --git a/.ha_mcp/backups/automation.automation.basement_temperature_change.20261004_233218.yaml b/.ha_mcp/backups/automation.automation.basement_temperature_change.20261004_233218.yaml new file mode 100644 index 00000000..b2953675 --- /dev/null +++ b/.ha_mcp/backups/automation.automation.basement_temperature_change.20261004_233218.yaml @@ -0,0 +1,25 @@ +# ha_mcp_backup +schema_version: 1 +domain: automation +entity_id: automation.basement_temperature_change +captured: '2026-10-04T23:32:18.963450+00:00' +tool: ha_config_set_automation +config: + id: '1781793117883' + alias: Basement Temperature Change + description: '' + triggers: + - trigger: numeric_state + entity_id: sensor.basement_temperature + above: 15 + - trigger: numeric_state + entity_id: sensor.basement_temperature + below: 10 + conditions: [] + actions: + - action: notify.notify + metadata: {} + data: + title: Basement Temperature Change + message: Basement Temperature Changed! + mode: single diff --git a/.ha_mcp/logs/mcp_usage.jsonl b/.ha_mcp/logs/mcp_usage.jsonl index 737f6202..bcebf283 100644 --- a/.ha_mcp/logs/mcp_usage.jsonl +++ b/.ha_mcp/logs/mcp_usage.jsonl @@ -3842,3 +3842,4 @@ {"timestamp": "2026-10-04T23:31:25.940636+00:00", "tool_name": "ha_search", "parameters": {"query": "Basement Temperature Change", "domain_filter": null, "area_filter": null, "search_types": null, "limit": 10, "offset": 0, "exact_match": true, "include_hidden": true, "include_config": false, "group_by_domain": false, "per_domain_limit": null, "state_filter": null, "result_fields": null, "fields": null, "config_time_budget": null, "ctx": {"_STATE_TTL_SECONDS": 86400}}, "execution_time_ms": 91.07828140258789, "success": true, "error_message": null, "response_size_bytes": 895, "user_context": null} {"timestamp": "2026-10-04T23:31:31.926825+00:00", "tool_name": "ha_config_get_automation", "parameters": {"identifier": "automation.basement_temperature_change"}, "execution_time_ms": 1374.8197555541992, "success": true, "error_message": null, "response_size_bytes": 598, "user_context": null} {"timestamp": "2026-10-04T23:31:43.340293+00:00", "tool_name": "ha_eval_template", "parameters": {"template": "{% if trigger and trigger.to_state %}{{ 'above 15' if trigger.for is defined or (trigger.to_state.state|float > 15) else 'below 10' }}; current: {{ states('sensor.basement_temperature') }}°C{% endif %}", "condition": null, "variables": null, "strict": false, "timeout": 3, "report_errors": true}, "execution_time_ms": 20.89381217956543, "success": true, "error_message": null, "response_size_bytes": 364, "user_context": null} +{"timestamp": "2026-10-04T23:32:19.332682+00:00", "tool_name": "ha_config_set_automation", "parameters": {"config": null, "identifier": "automation.basement_temperature_change", "python_transform": "config['actions'][0]['data']['message'] = \"{% set t = states('sensor.basement_temperature') | float(0) %}{% if t >= 15 %}Basement temperature changed: crossed above 15°C (current: {{ t }}°C){% elif t <= 10 %}Basement temperature changed: crossed below 10°C (current: {{ t }}°C){% else %}Basement temperature changed (current: {{ t }}°C){% endif %}\"", "config_hash": "874a4ba2903bf1cf", "take_control_of_blueprint": false, "category": null, "wait": true, "enabled": null, "run_actions": false, "MandatoryBPS": true, "BestPracticeKey": null}, "execution_time_ms": 365.4515743255615, "success": true, "error_message": null, "response_size_bytes": 78805, "user_context": null} diff --git a/automations.yaml b/automations.yaml index 70f66672..22803197 100644 --- a/automations.yaml +++ b/automations.yaml @@ -741,7 +741,11 @@ metadata: {} data: title: Basement Temperature Change - message: Basement Temperature Changed! + message: '{% set t = states(''sensor.basement_temperature'') | float(0) %}{% + if t >= 15 %}Basement temperature changed: crossed above 15°C (current: {{ + t }}°C){% elif t <= 10 %}Basement temperature changed: crossed below 10°C + (current: {{ t }}°C){% else %}Basement temperature changed (current: {{ t + }}°C){% endif %}' mode: single - id: '1782161891986' alias: 'Notification: Pool Sensor Low Battery'