|
1174 | 1174 | { |
1175 | 1175 | "name": "ha_config_remove_group", |
1176 | 1176 | "title": "Remove Group", |
1177 | | - "description": "Remove a service-based Home Assistant entity group via the group.remove service.\n\n**When NOT to use:** for groups created through `ha_config_set_helper(helper_type=\"group\", ...)`,\nuse `ha_delete_config_entry`. Those config-entry-backed groups are not reachable via the\ngroup.remove service, and `ha_config_remove_helper` does not support helper_type=\"group\".\n\n**When to use:** removing groups created with `ha_config_set_group` or defined in YAML\nvia `group:` configuration. Config-entry-backed deletion tools cannot find these.\n\nEXAMPLES:\n- Remove group: ha_config_remove_group(\"living_room_lights\")\n\nUse ha_config_list_groups() to find existing groups.\n\n**WARNING:**\n- Removing a group used in automations may cause those automations to fail.\n- Groups defined in YAML can be removed at runtime but will reappear after restart.\n- This only removes old-style groups, not platform-specific groups.", |
| 1177 | + "description": "Remove a service-based Home Assistant entity group via the group.remove service.\n\n**When NOT to use:** for groups created through `ha_config_set_helper(helper_type=\"group\", ...)`,\nuse `ha_delete_helpers_integrations`. Those config-entry-backed groups are not reachable via the\ngroup.remove service.\n\n**When to use:** removing groups created with `ha_config_set_group` or defined in YAML\nvia `group:` configuration. Config-entry-backed deletion tools cannot find these.\n\nEXAMPLES:\n- Remove group: ha_config_remove_group(\"living_room_lights\")\n\nUse ha_config_list_groups() to find existing groups.\n\n**WARNING:**\n- Removing a group used in automations may cause those automations to fail.\n- Groups defined in YAML can be removed at runtime but will reappear after restart.\n- This only removes old-style groups, not platform-specific groups.", |
1178 | 1178 | "inputSchema": { |
1179 | 1179 | "properties": { |
1180 | 1180 | "object_id": { |
|
1201 | 1201 | { |
1202 | 1202 | "name": "ha_config_set_group", |
1203 | 1203 | "title": "Create or Update Group", |
1204 | | - "description": "Create or update a service-based Home Assistant entity group via the group.set service.\n\n**When NOT to use:** for typical \"combine these entities into one controllable group\"\nrequests, prefer `ha_config_set_helper(helper_type=\"group\", ...)`. Config-entry-backed\ngroups are registered in the entity registry, so `ha_set_entity` can assign them to\nareas and they are deletable via `ha_delete_config_entry`.\n\n**When to use:** compatibility with existing groups already configured via group.set\nor YAML, or the rare case where entity-registry membership is explicitly unwanted.\nGroups created here are only removable via `ha_config_remove_group` — neither\n`ha_config_remove_helper` nor `ha_delete_config_entry` will find them.\n\n**For NEW groups:** Provide object_id and entities (required).\n**For EXISTING groups:** Provide object_id and any fields to update.\n\nEXAMPLES:\n- Create group: ha_config_set_group(\"bedroom_lights\", entities=[\"light.lamp\", \"light.ceiling\"])\n- Create with name: ha_config_set_group(\"sensors\", entities=[\"sensor.temp\"], name=\"All Sensors\")\n- Update name: ha_config_set_group(\"lights\", name=\"Living Room Lights\")\n- Add entities: ha_config_set_group(\"lights\", add_entities=[\"light.extra\"])\n- Remove entities: ha_config_set_group(\"lights\", remove_entities=[\"light.old\"])\n- Replace all entities: ha_config_set_group(\"lights\", entities=[\"light.new1\", \"light.new2\"])\n\n**NOTE:** entities, add_entities, and remove_entities are mutually exclusive.", |
| 1204 | + "description": "Create or update a service-based Home Assistant entity group via the group.set service.\n\n**When NOT to use:** for typical \"combine these entities into one controllable group\"\nrequests, prefer `ha_config_set_helper(helper_type=\"group\", ...)`. Config-entry-backed\ngroups are registered in the entity registry, so `ha_set_entity` can assign them to\nareas and they are deletable via `ha_delete_helpers_integrations`.\n\n**When to use:** compatibility with existing groups already configured via group.set\nor YAML, or the rare case where entity-registry membership is explicitly unwanted.\nGroups created here are only removable via `ha_config_remove_group` —\n`ha_delete_helpers_integrations` will not find them.\n\n**For NEW groups:** Provide object_id and entities (required).\n**For EXISTING groups:** Provide object_id and any fields to update.\n\nEXAMPLES:\n- Create group: ha_config_set_group(\"bedroom_lights\", entities=[\"light.lamp\", \"light.ceiling\"])\n- Create with name: ha_config_set_group(\"sensors\", entities=[\"sensor.temp\"], name=\"All Sensors\")\n- Update name: ha_config_set_group(\"lights\", name=\"Living Room Lights\")\n- Add entities: ha_config_set_group(\"lights\", add_entities=[\"light.extra\"])\n- Remove entities: ha_config_set_group(\"lights\", remove_entities=[\"light.old\"])\n- Replace all entities: ha_config_set_group(\"lights\", entities=[\"light.new1\", \"light.new2\"])\n\n**NOTE:** entities, add_entities, and remove_entities are mutually exclusive.", |
1205 | 1205 | "inputSchema": { |
1206 | 1206 | "properties": { |
1207 | 1207 | "object_id": { |
|
1383 | 1383 | ], |
1384 | 1384 | "source_file": "tools_config_helpers.py" |
1385 | 1385 | }, |
1386 | | - { |
1387 | | - "name": "ha_config_remove_helper", |
1388 | | - "title": "Remove Helper", |
1389 | | - "description": "Delete a Home Assistant helper entity.\n\nSUPPORTED HELPER TYPES:\n- input_button, input_boolean, input_select, input_number, input_text, input_datetime\n- counter, timer, schedule, zone, person, tag\n\nFor flow-based helper types (template, group, utility_meter, derivative,\nmin_max, threshold, integration, statistics, trend, random, filter, tod,\ngeneric_thermostat, switch_as_x, generic_hygrostat) use ha_delete_config_entry.\n\nEXAMPLES:\n- Delete button: ha_config_remove_helper(\"input_button\", \"my_button\")\n- Delete counter: ha_config_remove_helper(\"counter\", \"my_counter\")\n- Delete timer: ha_config_remove_helper(\"timer\", \"my_timer\")\n- Delete schedule: ha_config_remove_helper(\"schedule\", \"work_hours\")\n\n**WARNING:** Deleting a helper that is used by automations or scripts may cause those automations/scripts to fail.\nUse ha_search_entities() to verify the helper exists before attempting to delete it.", |
1390 | | - "inputSchema": { |
1391 | | - "properties": { |
1392 | | - "helper_type": { |
1393 | | - "type": "Annotated[Literal['input_button', 'input_boolean', 'input_select', 'input_number', 'input_text', 'input_datetime', 'counter', 'timer', 'schedule', 'zone', 'person', 'tag'], Field(description='Type of helper entity to delete')]" |
1394 | | - }, |
1395 | | - "helper_id": { |
1396 | | - "type": "Annotated[str, Field(description=\"Helper ID to delete (e.g., 'my_button' or 'input_button.my_button')\")]" |
1397 | | - }, |
1398 | | - "wait": { |
1399 | | - "type": "Annotated[bool | str, Field(description='Wait for helper entity to be fully removed before returning. Default: True.', default=True)]", |
1400 | | - "default": true |
1401 | | - } |
1402 | | - }, |
1403 | | - "required": [ |
1404 | | - "helper_type", |
1405 | | - "helper_id" |
1406 | | - ] |
1407 | | - }, |
1408 | | - "annotations": { |
1409 | | - "destructiveHint": true, |
1410 | | - "idempotentHint": true |
1411 | | - }, |
1412 | | - "tags": [ |
1413 | | - "Helper Entities" |
1414 | | - ], |
1415 | | - "source_file": "tools_config_helpers.py" |
1416 | | - }, |
1417 | 1386 | { |
1418 | 1387 | "name": "ha_config_set_helper", |
1419 | 1388 | "title": "Create or Update Helper", |
|
1576 | 1545 | ], |
1577 | 1546 | "source_file": "tools_config_helpers.py" |
1578 | 1547 | }, |
| 1548 | + { |
| 1549 | + "name": "ha_delete_helpers_integrations", |
| 1550 | + "title": "Delete Helper or Integration", |
| 1551 | + "description": "Delete a Home Assistant helper or integration config entry.\n\nCombines simple-helper websocket deletion and config-entry deletion\nunder one entry point with three routing paths driven by helper_type.\n\nWHEN NOT TO USE:\n- Removing only an entity (without deleting its underlying helper or\n config entry) — use `ha_remove_entity` instead.\n- YAML-configured helpers — they have no storage backend. Edit the\n YAML file and reload the relevant integration.\n\nSUPPORTED HELPER TYPES:\n- SIMPLE (12, websocket-delete): input_button, input_boolean,\n input_select, input_number, input_text, input_datetime, counter,\n timer, schedule, zone, person, tag.\n- FLOW (15, config-entry-delete via entity lookup): template, group,\n utility_meter, derivative, min_max, threshold, integration,\n statistics, trend, random, filter, tod, generic_thermostat,\n switch_as_x, generic_hygrostat.\n\nROUTING:\n- SIMPLE helper_type + bare helper_id or entity_id → websocket delete.\n- FLOW helper_type + entity_id → resolve entity_id to config_entry_id\n via entity_registry, then delete the config entry. All sub-entities\n (e.g. utility_meter tariffs) are removed together.\n- helper_type=None + entry_id → direct config entry delete (any\n integration).\n\nEXAMPLES:\n- Delete SIMPLE button:\n ha_delete_helpers_integrations(\n target=\"my_button\", helper_type=\"input_button\", confirm=True\n )\n- Delete FLOW utility_meter (any sub-entity works):\n ha_delete_helpers_integrations(\n target=\"sensor.energy_peak\",\n helper_type=\"utility_meter\",\n confirm=True,\n )\n- Delete any integration by entry_id:\n ha_delete_helpers_integrations(\n target=\"01HXYZ...\", confirm=True\n )\n\n**WARNING:** Deleting a helper or integration that is referenced by\nautomations, scripts, or other integrations may cause those to fail.\nUse ha_search_entities() / ha_get_integration() to verify before\ndeletion. Cannot be undone.", |
| 1552 | + "inputSchema": { |
| 1553 | + "properties": { |
| 1554 | + "target": { |
| 1555 | + "type": "Annotated[str, Field(description=\"What to delete. One of: (a) bare helper_id for SIMPLE helpers (requires helper_type), e.g. 'my_button'; (b) full entity_id (requires helper_type), e.g. 'input_button.my_button' or 'sensor.my_meter'; (c) config entry_id for any integration (helper_type=None), e.g. value from ha_get_integration().\")]" |
| 1556 | + }, |
| 1557 | + "helper_type": { |
| 1558 | + "type": "Annotated[HelperTypeLiteral | None, Field(description='Helper type. Required when target is a helper_id (bare) or entity_id. Set to None when target is a config entry_id to delete any integration.', default=None)]", |
| 1559 | + "default": null |
| 1560 | + }, |
| 1561 | + "confirm": { |
| 1562 | + "type": "Annotated[bool | str, Field(description=\"Must be True to confirm deletion. Accepts bool or string ('true'/'false'/'1'/'0'/'yes'/'no'/'on'/'off', case-insensitive) for transport ergonomics.\", default=False)]", |
| 1563 | + "default": false |
| 1564 | + }, |
| 1565 | + "wait": { |
| 1566 | + "type": "Annotated[bool | str, Field(description=\"Wait for entity removal. Default: True. Ignored when helper_type=None (no entity poll, require_restart returned). Accepts bool or string ('true'/'false'/'1'/'0'/'yes'/'no'/'on'/'off', case-insensitive).\", default=True)]", |
| 1567 | + "default": true |
| 1568 | + } |
| 1569 | + }, |
| 1570 | + "required": [ |
| 1571 | + "target" |
| 1572 | + ] |
| 1573 | + }, |
| 1574 | + "annotations": { |
| 1575 | + "destructiveHint": true |
| 1576 | + }, |
| 1577 | + "tags": [ |
| 1578 | + "Helper Entities", |
| 1579 | + "Integrations" |
| 1580 | + ], |
| 1581 | + "source_file": "tools_integrations.py" |
| 1582 | + }, |
1579 | 1583 | { |
1580 | 1584 | "name": "ha_get_helper_schema", |
1581 | 1585 | "title": "Get Helper Schema", |
|
1761 | 1765 | ], |
1762 | 1766 | "source_file": "tools_utility.py" |
1763 | 1767 | }, |
1764 | | - { |
1765 | | - "name": "ha_delete_config_entry", |
1766 | | - "title": "Delete Config Entry", |
1767 | | - "description": "Delete config entry permanently. Requires confirm=True.\n\nUse ha_get_integration() to find entry IDs.", |
1768 | | - "inputSchema": { |
1769 | | - "properties": { |
1770 | | - "entry_id": { |
1771 | | - "type": "Annotated[str, Field(description='Config entry ID')]" |
1772 | | - }, |
1773 | | - "confirm": { |
1774 | | - "type": "Annotated[bool | str, Field(description='Must be True to confirm deletion')]", |
1775 | | - "default": false |
1776 | | - } |
1777 | | - }, |
1778 | | - "required": [ |
1779 | | - "entry_id" |
1780 | | - ] |
1781 | | - }, |
1782 | | - "annotations": { |
1783 | | - "destructiveHint": true |
1784 | | - }, |
1785 | | - "tags": [ |
1786 | | - "Integrations" |
1787 | | - ], |
1788 | | - "source_file": "tools_integrations.py" |
1789 | | - }, |
1790 | 1768 | { |
1791 | 1769 | "name": "ha_get_integration", |
1792 | 1770 | "title": "Get Integration", |
|
0 commit comments