Skip to content

[zh-TW] Add remaining slot combinations (climate floor, cover floor, vacuum area) - #4023

Merged
bluefoxlee merged 1 commit into
OHF-Voice:mainfrom
parkghost:zh-tw/complete-coverage
Jul 29, 2026
Merged

[zh-TW] Add remaining slot combinations (climate floor, cover floor, vacuum area)#4023
bluefoxlee merged 1 commit into
OHF-Voice:mainfrom
parkghost:zh-tw/complete-coverage

Conversation

@parkghost

Copy link
Copy Markdown
Contributor

Changes

Fills the last gaps in zh-TW's slot-combination coverage. Five combinations across three intents, each with a matching self-contained test file.

Vacuum — area_only (the practically useful part)

HassVacuumStart already had floor_only and name_only, and HassVacuumReturnToBase only had name_only — so a robot could be addressed by name or by floor, but not by area:

  • HassVacuumStart/area_only — 啟動客廳的掃地機器人 / 讓客廳的掃地機器人開始打掃
  • HassVacuumReturnToBase/area_only — 讓客廳的掃地機器人回充電座

Beyond filling the asymmetry, these templates put the colloquial nouns (掃地機器人|掃地機|吸塵器) in the sentence itself and target via {area} + the vacuum domain, so they work regardless of what the entity happens to be named. The name_only templates only match when the user says the entity's registered name, which in practice often differs from what people actually call the device.

Floor combinations

  • HassClimateGetTemperature/floor_only — 現在二樓幾度 / 二樓多熱
  • HassSetPosition/floor_device_class — 把二樓的窗簾開到50%
  • HassSetPosition/name_floor — 把二樓的窗簾開到50%

These mirror the existing zh-TW area_only / area_device_class / name_area templates with 樓層 targeting.

Note that en does not currently define any of these five combinations, so there is no en counterpart to mirror — the templates follow the zh-TW patterns already in the tree.

Testing

  • python3 -m script.intentfest validate --language zh-TW — All good!
  • pytest tests --language zh-TW — 262 passed

Branch verified standalone in an isolated worktree, rebased onto current main.

The two vacuum templates were also verified against a live Home Assistant instance with a custom home-assistant-intents build: 讓臥室的掃地機器人回充電座 correctly resolves to the vacuum in that area even though the entity is registered under a different name.

@parkghost
parkghost requested a review from bluefoxlee as a code owner July 29, 2026 05:49
@bluefoxlee
bluefoxlee merged commit 4d3c958 into OHF-Voice:main Jul 29, 2026
2 checks passed
@parkghost
parkghost deleted the zh-tw/complete-coverage branch July 29, 2026 12:40
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants