diff --git a/.ha_mcp/logs/mcp_usage.jsonl b/.ha_mcp/logs/mcp_usage.jsonl index 4d9fe995..0d49c60f 100644 --- a/.ha_mcp/logs/mcp_usage.jsonl +++ b/.ha_mcp/logs/mcp_usage.jsonl @@ -3642,3 +3642,4 @@ {"timestamp": "2026-09-17T14:31:01.633611+00:00", "tool_name": "ha_config_get_automation", "parameters": {"identifier": "automation.3d_printer_light_sync_boolean"}, "execution_time_ms": 595.3388214111328, "success": true, "error_message": null, "response_size_bytes": 1106, "user_context": null} {"timestamp": "2026-09-17T14:31:02.147898+00:00", "tool_name": "ha_config_get_automation", "parameters": {"identifier": "automation.3d_printer_running_reconcile_on_ha_start"}, "execution_time_ms": 723.7074375152588, "success": true, "error_message": null, "response_size_bytes": 1290, "user_context": null} {"timestamp": "2026-09-17T14:31:18.448517+00:00", "tool_name": "ha_search", "parameters": {"query": "3d_printer_running", "domain_filter": null, "area_filter": null, "search_types": ["automation", "script"], "limit": 20, "offset": 0, "exact_match": true, "include_hidden": true, "include_config": true, "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": 76.6148567199707, "success": true, "error_message": null, "response_size_bytes": 3806, "user_context": null} +{"timestamp": "2026-09-17T14:36:49.877791+00:00", "tool_name": "ha_config_set_automation", "parameters": {"config": {"actions": [{"action": "input_boolean.turn_off", "target": {"entity_id": "input_boolean.3d_printer_running"}}, {"delay": {"seconds": 2}}, {"action": "input_boolean.turn_on", "target": {"entity_id": "input_boolean.3d_printer_running"}}], "alias": "3D Printer Running - Reset Stale Boolean", "conditions": [{"condition": "state", "entity_id": "input_boolean.3d_printer_running", "state": "on"}, {"condition": "template", "value_template": "{% set sd = trigger.event.data.get('service_data', {}) %}\n{% set eid = sd.get('entity_id') %}\n{% set tgt = sd.get('target', {}) if sd else {} %}\n{% set tid = tgt.get('entity_id') %}\n{% set hits = [] %}\n{% for item in [eid, tid] if item %}\n {% if item is string %}\n {% set hits = hits + [item] %}\n {% elif item is sequence %}\n {% set hits = hits + item %}\n {% endif %}\n{% endfor %}\n{{ 'input_boolean.3d_printer_running' in hits and (now() - states.input_boolean.3d_printer_running.last_changed).total_seconds() > 5 }}"}], "description": "If input_boolean.3d_printer_running is commanded on while already on (e.g. after a printer crash left it on, so no off->on transition fires the main automation), force a quick off->on bounce so the main automation runs its print-started actions. The >5s stale check prevents responding to its own bounce.", "mode": "single", "triggers": [{"event_data": {"domain": "input_boolean", "service": "turn_on"}, "event_type": "call_service", "id": "cmd_on", "trigger": "event"}]}, "identifier": null, "python_transform": null, "config_hash": null, "take_control_of_blueprint": false, "category": null, "wait": true, "MandatoryBPS": false, "BestPracticeKey": null}, "execution_time_ms": 63.30728530883789, "success": false, "error_message": "{\n \"skill_content_hint\": \"Pass `MandatoryBPS=false` on subsequent calls to this tool in this session to skip this content.\",\n \"success\": false,\n \"error\": {\n \"code\": \"VALIDATION_FAILED\",\n \"message\": \"Invalid automation configuration: API error: 400 - Message malformed: invalid template (TemplateSyntaxError: expected token ')', got 'd_printer_running') at 'conditions[1].value_template'\",\n \"suggestion\": \"Check automation configuration format\",\n \"suggestions\": [\n \"Check automation configuration format\",\n \"Ensure required fields: alias, triggers, actions\",\n \"Use entity_id format: automation.morning_routine or unique_id\",\n \"Use ha_search(domain_filter='automation') to find automations\",\n \"Use ha_get_skill_guide for automation examples\",\n \"Config had best-practice issues that may be related: Condition uses template for duration/recency check (`now() - X.last_changed/last_updated`) \\u2014 use the native `for:` field on a `state` trigger or condition instead (e.g., `platform: state, entity_id: binary_sensor.motion, to: 'off', for: {minutes: 5}`). Native `for:` is event-driven and avoids repeated template evaluation on every state change. See skill://home-assistant-best-practices/references/automation-patterns.md#native-conditions | call ha_get_skill_guide(skill='home-assistant-best-practices', file='references/automation-patterns.md')\",\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 \"identifier\": null,\n \"skill_content\": {\n \"references/automation-patterns.md#native-conditions\": \"## Native Conditions\\n\\n### State Condition\\n\\nThe most common condition type. Supports multiple states, attributes, and duration.\\n\\n```yaml\\n# Single state\\ncondition: state\\nentity_id: light.living_room\\nstate: \\\"on\\\"\\n\\n# Multiple acceptable states (OR logic)\\ncondition: state\\nentity_id: vacuum.robot\\nstate:\\n - \\\"cleaning\\\"\\n - \\\"returning\\\"\\n\\n# Attribute check\\ncondition: state\\nentity_id: climate.thermostat\\nattribute: hvac_action\\nstate: \\\"heating\\\"\\n\\n# Duration check (entity has been in state for X time)\\ncondition: state\\nentity_id: binary_sensor.motion\\nstate: \\\"off\\\"\\nfor:\\n minutes: 5\\n```\\n\\n### Numeric State Condition\\n\\nFor numeric comparisons. Always prefer over template conditions with `| float`.\\n\\n```yaml\\n# Above threshold\\ncondition: numeric_state\\nentity_id: sensor.temperature\\nabove: 25\\n\\n# Below threshold\\ncondition: numeric_state\\nentity_id: sensor.humidity\\nbelow: 30\\n\\n# Range\\ncondition: numeric_state\\nentity_id: sensor.battery\\nabove: 20\\nbelow: 80\\n\\n# Attribute numeric check\\ncondition: numeric_state\\nentity_id: sun.sun\\nattribute: elevation\\nbelow: -6\\n```\\n\\n### Time Condition\\n\\nFor time-based restrictions. Handles midnight crossing automatically.\\n\\n```yaml\\n# Time range (handles midnight crossing!)\\ncondition: time\\nafter: \\\"22:00:00\\\"\\nbefore: \\\"06:00:00\\\"\\n\\n# Weekday filter\\ncondition: time\\nweekday:\\n - mon\\n - tue\\n - wed\\n - thu\\n - fri\\n\\n# Combined\\ncondition: time\\nafter: \\\"09:00:00\\\"\\nbefore: \\\"17:00:00\\\"\\nweekday:\\n - mon\\n - tue\\n - wed\\n - thu\\n - fri\\n```\\n\\n> **A one-sided window anchors at midnight \\u2014 it does not carve a slot out of the day.**\\n> A `condition: time` with only `before: \\\"21:00:00\\\"` is true from **00:00 to 21:00**, so it still\\n> matches 01:00, 04:00 and 06:00; with only `after: \\\"21:00:00\\\"` it is true from 21:00 to midnight.\\n> To restrict to daytime, give **both** bounds (`after: \\\"06:00:00\\\"` *and* `before: \\\"21:00:00\\\"`).\\n> A window spans midnight only when `after` is later than `before` (e.g. `after: \\\"22:00:00\\\"`,\\n> `before: \\\"06:00:00\\\"`).\\n\\n### Sun Condition\\n\\nFor sunrise/sunset-based logic with optional offsets.\\n\\n```yaml\\n# After sunset\\ncondition: sun\\nafter: sunset\\n\\n# Before sunrise with offset\\ncondition: sun\\nbefore: sunrise\\nbefore_offset: \\\"01:00:00\\\"\\n\\n# After sunset by 30 minutes\\ncondition: sun\\nafter: sunset\\nafter_offset: \\\"00:30:00\\\"\\n```\\n\\n### Zone Condition\\n\\nFor presence detection based on zones.\\n\\n```yaml\\ncondition: zone\\nentity_id: person.john\\nzone: zone.home\\n\\n# Or check if NOT in zone\\ncondition: not\\nconditions:\\n - condition: zone\\n entity_id: person.john\\n zone: zone.home\\n```\\n\\n### And/Or/Not Conditions\\n\\nCombine conditions with logical operators.\\n\\n```yaml\\n# AND (default when multiple conditions listed)\\ncondition: and\\nconditions:\\n - condition: state\\n entity_id: light.kitchen\\n state: \\\"on\\\"\\n - condition: numeric_state\\n entity_id: sensor.brightness\\n below: 100\\n\\n# OR\\ncondition: or\\nconditions:\\n - condition: state\\n entity_id: person.john\\n state: \\\"home\\\"\\n - condition: state\\n entity_id: person.jane\\n state: \\\"home\\\"\\n\\n# NOT\\ncondition: not\\nconditions:\\n - condition: state\\n entity_id: alarm_control_panel.home\\n state: \\\"armed_away\\\"\\n\\n# Shorthand syntax\\nconditions:\\n - and:\\n - condition: state\\n entity_id: input_boolean.guest_mode\\n state: \\\"on\\\"\\n - condition: time\\n after: \\\"08:00:00\\\"\\n```\\n\\n### Template Condition Shorthand\\n\\nWhen you must use a template, use the shorthand syntax:\\n\\n```yaml\\n# Shorthand (preferred when template is necessary)\\nconditions:\\n - \\\"{{ trigger.to_state.attributes.brightness > 100 }}\\\"\\n\\n# Long form (equivalent)\\nconditions:\\n - condition: template\\n value_template: \\\"{{ trigger.to_state.attributes.brightness > 100 }}\\\"\\n```\\n\\n### Trigger Condition\\n\\nMatches *which* trigger started the run, by trigger `id` \\u2014 the clean way to branch on the trigger (see [Trigger IDs](#trigger-ids)) instead of templating `trigger.id`. Only true when the run was started by a trigger (false in scripts and manual runs).\\n\\n```yaml\\ncondition: trigger\\nid: motion_on # a single id, or a list (OR semantics):\\n# id:\\n# - motion_on\\n# - motion_off\\n```\\n\\n---\\n\\n\"\n }\n}", "response_size_bytes": null, "user_context": null} diff --git a/zigbee2mqtt/state.json b/zigbee2mqtt/state.json index 340fb9c8..9a940556 100644 --- a/zigbee2mqtt/state.json +++ b/zigbee2mqtt/state.json @@ -7,7 +7,7 @@ "voltage": 118.8, "countdown_to_turn_on": 0, "ac_frequency": 60, - "power_factor": 0.11, + "power_factor": 0.14, "update": { "state": "idle", "installed_version": 268513381, @@ -27,10 +27,10 @@ "led_brightness": 100, "countdown_to_turn_off": 0, "countdown_to_turn_on": 0, - "power": 2.1, - "current": 0.09, + "power": 2.4, + "current": 0.1, "energy": 43.29, - "power_factor": 0.17, + "power_factor": 0.18, "update": { "state": "idle", "installed_version": 268513381, @@ -45,7 +45,7 @@ "state": "ON", "led_brightness": 100, "countdown_to_turn_off": 0, - "voltage": 118.4, + "voltage": 117.9, "countdown_to_turn_on": 0, "energy": 84.59, "power_factor": 0.42, @@ -58,7 +58,7 @@ "latest_release_notes": null }, "linkquality": 98, - "power": 85.6, + "power": 84.2, "current": 0.84, "power_on_behavior": "on" }, @@ -74,13 +74,13 @@ "led_brightness": 100, "countdown_to_turn_off": 0, "countdown_to_turn_on": 0, - "voltage": 117.6, + "voltage": 117.3, "state": "ON", "ac_frequency": 60, "energy": 172.89, - "power": 0.8, - "current": 0.05, - "power_factor": 0.39, + "power": 101.4, + "current": 0.91, + "power_factor": 0.94, "update": { "state": "idle", "installed_version": 268513381, @@ -95,13 +95,13 @@ "led_brightness": 100, "countdown_to_turn_off": 0, "countdown_to_turn_on": 0, - "voltage": 118.5, - "energy": 84.76, + "voltage": 118, + "energy": 84.77, "state": "ON", - "power": 53.4, - "current": 0.63, + "power": 85.4, + "current": 0.77, "ac_frequency": 60, - "power_factor": 0.79, + "power_factor": 0.83, "update": { "state": "idle", "installed_version": 268513381, @@ -114,7 +114,7 @@ }, "0xffffb40e060895b3": { "state": "ON", - "voltage": 119, + "voltage": 118.5, "ac_frequency": 60, "energy": 11.39, "current": 0.01, @@ -136,7 +136,7 @@ "0xffffb40e0608864e": { "led_brightness": 100, "countdown_to_turn_off": 0, - "voltage": 118.8, + "voltage": 119.1, "energy": 26.14, "countdown_to_turn_on": 0, "state": "ON",