|
1276 | 1276 | { |
1277 | 1277 | "name": "ha_config_remove_group", |
1278 | 1278 | "title": "Remove Group", |
1279 | | - "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.", |
| 1279 | + "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_remove_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.", |
1280 | 1280 | "inputSchema": { |
1281 | 1281 | "properties": { |
1282 | 1282 | "object_id": { |
|
1303 | 1303 | { |
1304 | 1304 | "name": "ha_config_set_group", |
1305 | 1305 | "title": "Create or Update Group", |
1306 | | - "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.", |
| 1306 | + "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_remove_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_remove_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.", |
1307 | 1307 | "inputSchema": { |
1308 | 1308 | "properties": { |
1309 | 1309 | "object_id": { |
|
1668 | 1668 | "source_file": "tools_config_helpers.py" |
1669 | 1669 | }, |
1670 | 1670 | { |
1671 | | - "name": "ha_delete_helpers_integrations", |
1672 | | - "title": "Delete Helper or Integration", |
1673 | | - "description": "Delete a Home Assistant helper or integration config entry.\n\nCombines simple-helper websocket deletion, config-entry deletion, and\nconfig-subentry deletion under one entry point with four routing paths\ndriven 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- helper_type=\"config_subentry\" + parent entry_id + subentry_id →\n delete one config subentry.\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- Delete a config subentry:\n ha_delete_helpers_integrations(\n target=\"01HXYZ...\", helper_type=\"config_subentry\",\n subentry_id=\"subentry-123\", 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.", |
| 1671 | + "name": "ha_remove_helpers_integrations", |
| 1672 | + "title": "Remove Helper or Integration", |
| 1673 | + "description": "Remove a Home Assistant helper or integration config entry.\n\nCombines simple-helper websocket deletion, config-entry deletion, and\nconfig-subentry deletion under one entry point with four routing paths\ndriven 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- helper_type=\"config_subentry\" + parent entry_id + subentry_id →\n delete one config subentry.\n\nIDEMPOTENT-SUCCESS CONTRACT:\nA target that is *confirmed absent* returns ``success=True`` with\n``fallback_used=\"already_deleted\"``. This applies per-path:\n- SIMPLE: state-machine empty AND entity registry empty.\n- FLOW: entity_id not in registry (target was never there or\n already removed). YAML-configured helpers (no config entry\n backing) still raise ``RESOURCE_NOT_FOUND`` — that's a\n call-shape conflict, not a missing target.\n- Direct config entry (helper_type=None): backend returns HTTP 404.\n- Config subentry: backend returns a \"not_found\" error.\n\nTransient connectivity failures (WebSocket disconnected, network\ntimeouts) still raise so callers can retry. Idempotency applies\nonly when the target is *known* not to exist.\n\nEXAMPLES:\n- Delete SIMPLE button:\n ha_remove_helpers_integrations(\n target=\"my_button\", helper_type=\"input_button\", confirm=True\n )\n- Delete FLOW utility_meter (any sub-entity works):\n ha_remove_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_remove_helpers_integrations(\n target=\"01HXYZ...\", confirm=True\n )\n- Delete a config subentry:\n ha_remove_helpers_integrations(\n target=\"01HXYZ...\", helper_type=\"config_subentry\",\n subentry_id=\"subentry-123\", 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.", |
1674 | 1674 | "inputSchema": { |
1675 | 1675 | "properties": { |
1676 | 1676 | "target": { |
|
1698 | 1698 | ] |
1699 | 1699 | }, |
1700 | 1700 | "annotations": { |
1701 | | - "destructiveHint": true |
| 1701 | + "destructiveHint": true, |
| 1702 | + "idempotentHint": true |
1702 | 1703 | }, |
1703 | 1704 | "tags": [ |
1704 | 1705 | "Helper Entities", |
|
0 commit comments