Create or Update Helper
ha_config_set_helperCreate or update Home Assistant helpers, including simple types, flow-based helpers, and config subentries, while preserving existing fields on updates.
Instructions
Create or update Home Assistant helpers: storage types, every helper flow HA lists, and config subentries.
MUST call ha_get_skill_guide OR refer to your locally installed skills first.
helper-selection.md ships under skill_content by default.
SIMPLE types (pass config dict): input_boolean, input_button,
input_select, input_number, input_text, input_datetime, counter, timer, schedule,
zone, person, tag. Create requires name; update requires helper_id.
FLOW types (pass config dict, Config Entry Flow API): every helper flow
Home Assistant lists, read from it at call time — template, group,
utility_meter, derivative, min_max, threshold, integration, statistics,
trend, ... and custom helper integrations. Create requires name; for
updates pass the existing entry_id as helper_id (options flows reject
the name key).
Do not create otp here although Home Assistant lists it: the user sets
it up in the HA UI, since its secret is a credential they enroll in an
authenticator app.
CONFIG_SUBENTRY type (Config Subentry Flow API): pass entry_id,
subentry_type and config; pass subentry_id to reconfigure an existing
subentry, omit it to create one.
Behavior:
UPDATE preserves type-specific fields not re-passed (a rename never wipes initial/icon/etc.); flow-helper and config subentry updates behave the same way (see
config).Omitted
actionfalls back to thehelper_id-presence discriminator (SIMPLE/FLOW) or thesubentry_id-presence discriminator (config subentries).For flow-based helpers, config keys not declared by any step's data_schema are silently ignored by HA. Validation errors carry the helper's
data_schema(andmenu_optionsfor menu-rooted helpers liketemplate/groupwhen no sub-type is chosen yet), so a follow-up call can self-correct without a separate schema-discovery round-trip.Flows that present more than one menu (e.g. an MQTT device subentry reconfigure looping through its summary menu) take
next_step_idas a LIST of successive selections, consumed one per menu encounter.
EXAMPLES:
input_number: ha_config_set_helper(helper_type="input_number", name="Target", config={"min": 0, "max": 100, "step": 5})
template sensor: ha_config_set_helper(helper_type="template", name="Room Temp", config={"next_step_id": "sensor", "state": "{{ states('sensor.x')|float }}", "unit_of_measurement": "°C"})
group: ha_config_set_helper(helper_type="group", name="Kitchen Lights", config={"group_type": "light", "entities": ["light.a", "light.b"]})
config subentry: ha_config_set_helper(helper_type="config_subentry", entry_id="01HXYZ...", subentry_type="conversation", config={"name": "Local agent", "model": "gemma3:27b"})
If a Claude Desktop user gets a 4-minute timeout with no result on this call, read the target back before repeating it, and tell them to wait a few seconds before clicking the manual-approve button, as clicking it too quickly is known to cause hangs in Claude Desktop. This workaround is specific to Claude Desktop.
create update new add helper input_boolean input_button input_number input_text input_datetime input_select counter timer schedule zone person tag template group utility_meter derivative min_max threshold integration statistics trend random filter tod generic_thermostat switch_as_x generic_hygrostat history_stats mold_indicator
Input Schema
| Name | Required | Description | Default |
|---|---|---|---|
| icon | No | Material Design Icon (e.g., 'mdi:bell'); '' or ' ' clears it, except a zone's stored icon (the icon in the zone's own config, set at creation or by ha_set_zone; ha_get_zone shows it), which cannot be removed | |
| name | No | Display name for simple/flow helper creation. Optional on helper update. Ignored for helper_type='config_subentry', which uses entry_id/subentry_type/subentry_id instead. For flow-based helper updates (template, group, utility_meter, ...), this is ignored because options flows don't expose renaming; change the resulting entity's display name with ha_set_entity(name=...). | |
| wait | No | Wait for helper entity to be queryable before returning. Set to False for bulk operations. | |
| action | No | Explicit intent: 'create' a new helper or 'update' an existing one. Pass it so a helper_id typo fails as 'helper not found' instead of creating a helper. | |
| config | No | Type-specific fields. On update it is a patch: a field you omit keeps its current value. SIMPLE types take these keys: input_select: options (list, required), initial. input_number: min, max (required), step, unit_of_measurement, mode ('box'/'slider'), initial. input_text: min, max (length), mode ('text'/'password'), initial, unit_of_measurement, pattern (regex the value must match). input_datetime: has_date, has_time, initial. input_boolean: initial. counter: initial (starting value), minimum, maximum, step, restore (default true). timer: duration ('HH:MM:SS' or seconds), restore (default false). schedule: monday..sunday, each a list of {'from': 'HH:MM', 'to': 'HH:MM'} with optional 'data' dict of extra attributes. zone: latitude, longitude (both required), radius (meters, default 100), passive (won't trigger person state changes). person: user_id, device_trackers (device_tracker entity IDs), picture (URL). tag: tag_id (omit on create to auto-generate), description. On input_* types, `initial` — even false/0 — disables last-state restore and forces that value on every HA restart. ha_config_list_helpers(helper_type, describe=True) lists a type's fields. FLOW types and config_subentry take the flow's fields; a field set to null is cleared where the schema allows that field to be empty. A field two steps declare gets your one value both times; pass step_values={'<step_id>': {'<field>': <value>}} to give a step its own value, or to leave it out of that step; a LIST of those objects supplies one per encounter when the flow presents a step more than once. | |
| labels | No | Labels to categorize the helper | |
| area_id | No | Area ID for the helper; '' or ' ' clears it | |
| category | No | Category ID for this helper (ha_config_get_category(scope='helpers') lists them, ha_config_set_category() creates one); '' or ' ' clears it. | |
| entry_id | No | Parent config entry ID when helper_type='config_subentry'. Use ha_get_integration() to find entry IDs. | |
| helper_id | No | Bare ID ('my_button') or full entity ID ('input_button.my_button'). Omit to create a new helper. | |
| helper_type | Yes | Type of helper to create or update. | |
| subentry_id | No | Existing config subentry ID to reconfigure when helper_type='config_subentry'. | |
| MandatoryBPS | No | ||
| subentry_type | No | Integration-defined subentry type when helper_type='config_subentry'. | |
| BestPracticeKey | No | Read-receipt for the home-assistant-best-practices skill; required when strict best-practices mode is enabled. Not a secret or credential: the current value is an attestation phrase published openly at the top of the skill content served by ha_get_skill_guide. Read that content, then pass the value back verbatim — this round-trip is the server's designed protocol confirming the practices were read before writing. | |
| show_advanced_options | No | When helper_type='config_subentry', ask older Home Assistant versions to expose advanced flow options. No-op on HA 2026.6+; pending removal before HA 2027.6. |
Output Schema
| Name | Required | Description | Default |
|---|---|---|---|
No arguments | |||