[zh-TW] Add remaining slot combinations (climate floor, cover floor, vacuum area) - #4023
Merged
Merged
Conversation
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
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)HassVacuumStartalready hadfloor_onlyandname_only, andHassVacuumReturnToBaseonly hadname_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. Thename_onlytemplates 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_areatemplates with 樓層 targeting.Note that
endoes not currently define any of these five combinations, so there is noencounterpart 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 passedBranch 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-intentsbuild: 讓臥室的掃地機器人回充電座 correctly resolves to the vacuum in that area even though the entity is registered under a different name.