|
1422 | 1422 | { |
1423 | 1423 | "name": "ha_config_set_helper", |
1424 | 1424 | "title": "Create or Update Helper", |
1425 | | - "description": "Create or update Home Assistant helper entities (27 types, unified interface).\n\nCreates new helper if helper_id is omitted, updates existing if helper_id is provided.\n\nSIMPLE types (structured params, WebSocket API): input_boolean, input_button,\ninput_select, input_number, input_text, input_datetime, counter, timer, schedule,\nzone, person, tag.\n\nFLOW types (pass `config` dict, Config Entry Flow API): template, group,\nutility_meter, derivative, min_max, threshold, integration, statistics, trend,\nrandom, filter, tod, generic_thermostat, switch_as_x, generic_hygrostat.\nNote: `tod` is the purpose-built \"is-current-time-in-range\" indicator\n(supports cross-midnight ranges, unlike `schedule`).\n\nFor flow-type updates, pass the existing entry_id as `helper_id`. Options flows\nreject the `name` key on update — to rename a flow helper, delete and recreate.\n\nEXAMPLES (menu-based types + tod, where first-call payload is non-obvious):\n- template sensor:\n ha_config_set_helper(helper_type=\"template\", name=\"Room Temp\",\n config={\"next_step_id\": \"sensor\",\n \"state\": \"{{ states('sensor.x')|float }}\",\n \"unit_of_measurement\": \"°C\"})\n- group (light):\n ha_config_set_helper(helper_type=\"group\", name=\"Kitchen Lights\",\n config={\"group_type\": \"light\",\n \"entities\": [\"light.a\", \"light.b\"]})\n- tod (time-of-day indicator, cross-midnight OK):\n ha_config_set_helper(helper_type=\"tod\", name=\"Quiet Hours\",\n config={\"after_time\": \"22:00:00\", \"before_time\": \"07:00:00\"})\n\nFor complex schemas and per-type parameter details, use ha_get_helper_schema.", |
| 1425 | + "description": "Create or update Home Assistant helper entities (27 types, unified interface).\n\nCreate requires `name`; update requires `helper_id`.\n\nSIMPLE types (structured params, WebSocket API): input_boolean, input_button,\ninput_select, input_number, input_text, input_datetime, counter, timer, schedule,\nzone, person, tag.\n\nFLOW types (pass `config` dict, Config Entry Flow API): template, group,\nutility_meter, derivative, min_max, threshold, integration, statistics, trend,\nrandom, filter, tod, generic_thermostat, switch_as_x, generic_hygrostat.\nNote: `tod` is the purpose-built \"is-current-time-in-range\" indicator\n(supports cross-midnight ranges, unlike `schedule`).\n\nFor flow-type updates, pass the existing entry_id as `helper_id`. Options flows\nreject the `name` key on update — to rename a flow helper, delete and recreate.\n\nEXAMPLES (menu-based types + tod, where first-call payload is non-obvious):\n- template sensor:\n ha_config_set_helper(helper_type=\"template\", name=\"Room Temp\",\n config={\"next_step_id\": \"sensor\",\n \"state\": \"{{ states('sensor.x')|float }}\",\n \"unit_of_measurement\": \"°C\"})\n- group (light):\n ha_config_set_helper(helper_type=\"group\", name=\"Kitchen Lights\",\n config={\"group_type\": \"light\",\n \"entities\": [\"light.a\", \"light.b\"]})\n- tod (time-of-day indicator, cross-midnight OK):\n ha_config_set_helper(helper_type=\"tod\", name=\"Quiet Hours\",\n config={\"after_time\": \"22:00:00\", \"before_time\": \"07:00:00\"})\n\nFor complex schemas and per-type parameter details, use ha_get_helper_schema.", |
1426 | 1426 | "inputSchema": { |
1427 | 1427 | "properties": { |
1428 | 1428 | "helper_type": { |
1429 | 1429 | "type": "Annotated[Literal['counter', 'derivative', 'filter', 'generic_hygrostat', 'generic_thermostat', 'group', 'input_boolean', 'input_button', 'input_datetime', 'input_number', 'input_select', 'input_text', 'integration', 'min_max', 'person', 'random', 'schedule', 'statistics', 'switch_as_x', 'tag', 'template', 'threshold', 'timer', 'tod', 'trend', 'utility_meter', 'zone'], Field(description='Type of helper entity to create or update')]" |
1430 | 1430 | }, |
1431 | 1431 | "name": { |
1432 | | - "type": "Annotated[str | None, Field(description=\"Display name for the helper. Required on create; optional on update (pass helper_id to skip). For flow-based helper types on update (template, group, utility_meter, ...), this is typically ignored — options flows don't expose renaming. Rename a flow helper by deleting and recreating instead.\", default=None)]", |
| 1432 | + "type": "Annotated[str | None, Field(description=\"REQUIRED when creating (no helper_id provided). Display name for the helper. Optional on update — pass helper_id instead. For flow-based helper types on update (template, group, utility_meter, ...), this is typically ignored — options flows don't expose renaming. Rename a flow helper by deleting and recreating instead.\", default=None)]", |
1433 | 1433 | "default": null |
1434 | 1434 | }, |
1435 | 1435 | "helper_id": { |
1436 | | - "type": "Annotated[str | None, Field(description=\"Helper ID for updates (e.g., 'my_button' or 'input_button.my_button'). If not provided, creates a new helper.\", default=None)]", |
| 1436 | + "type": "Annotated[str | None, Field(description=\"REQUIRED when updating an existing helper. Bare ID ('my_button') or full entity ID ('input_button.my_button'). Omit to create a new helper.\", default=None)]", |
1437 | 1437 | "default": null |
1438 | 1438 | }, |
1439 | 1439 | "icon": { |
|
0 commit comments