Create or Update Area or Floor
ha_set_area_or_floorAdd or update area or floor definitions in Home Assistant, including name, icon, and optional picture or level.
Instructions
Create or update a Home Assistant area or floor.
Pass kind='area' (with optional floor_id, picture) or kind='floor' (with optional level). Provide name only to create a new entry; provide id to update an existing one. Cross-kind parameters (e.g., picture under kind='floor') are rejected with VALIDATION_INVALID_PARAMETER.
EXAMPLES: ha_set_area_or_floor(kind="area", name="Kitchen") ha_set_area_or_floor(kind="area", id="kitchen", floor_id="ground_floor") ha_set_area_or_floor(kind="floor", name="Basement", level=-1) ha_set_area_or_floor(kind="floor", id="ground_floor", level=0)
Input Schema
| Name | Required | Description | Default |
|---|---|---|---|
| id | No | Existing area_id or floor_id to update (omit to create a new entry; use ha_list_floors_areas to find IDs) | |
| icon | No | Material Design Icon (e.g., 'mdi:sofa', 'mdi:home-floor-1', empty string to remove) | |
| kind | Yes | Which registry to operate on: 'area' for rooms, 'floor' for building levels | |
| name | No | Name (required when creating; optional when updating, e.g., 'Living Room', 'Ground Floor') | |
| level | No | Numeric level when kind='floor' (0=ground, 1=first, -1=basement). Only valid when kind='floor'. | |
| aliases | No | Alternative names for voice assistant recognition (e.g., ['lounge'], empty list to clear) | |
| picture | No | Picture URL when kind='area' (empty string to remove). Only valid when kind='area'. | |
| floor_id | No | Floor assignment when kind='area' (use empty string to clear). Only valid when kind='area'. |
Output Schema
| Name | Required | Description | Default |
|---|---|---|---|
No arguments | |||