Commit 8597c63
fix: join the entity registry on the ha_config_list_helpers legacy fallback (#1960)
_legacy_helper_list (the component-error fallback inside
_list_helpers_via_component, reached from both the command-error and the
transport-failure branches) flattened the {type}/list result but never
called _enrich_helpers_with_current_registry, so a helper renamed in the
UI was served with its stale storage id/name on that path, the same #1794
staleness the inline body fixes. Route the fallback result through the
same registry join and thread its degrade-open warnings into the
response.
The all-types merge consumes _legacy_helper_list for uncovered simple
types and previously dropped its (until now always-empty) warnings;
propagate them too so a failed registry read is not served silently
stale.
Tests: assert entity_id/name/original_name on both fallback branches, and
that the all-types merge surfaces the stale-join warning.
Closes #1945
Co-authored-by: Claude Opus 4.8 (1M context) <noreply@anthropic.com>1 parent 177dae1 commit 8597c63
2 files changed
Lines changed: 76 additions & 7 deletions
File tree
- src/ha_mcp/tools
- tests/src/unit
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
4001 | 4001 | | |
4002 | 4002 | | |
4003 | 4003 | | |
4004 | | - | |
4005 | | - | |
4006 | | - | |
4007 | | - | |
4008 | | - | |
| 4004 | + | |
| 4005 | + | |
| 4006 | + | |
| 4007 | + | |
| 4008 | + | |
4009 | 4009 | | |
4010 | 4010 | | |
4011 | 4011 | | |
| |||
4023 | 4023 | | |
4024 | 4024 | | |
4025 | 4025 | | |
4026 | | - | |
| 4026 | + | |
| 4027 | + | |
| 4028 | + | |
| 4029 | + | |
| 4030 | + | |
| 4031 | + | |
| 4032 | + | |
4027 | 4033 | | |
4028 | 4034 | | |
4029 | 4035 | | |
4030 | 4036 | | |
4031 | 4037 | | |
4032 | 4038 | | |
| 4039 | + | |
| 4040 | + | |
| 4041 | + | |
4033 | 4042 | | |
4034 | 4043 | | |
4035 | 4044 | | |
| |||
4145 | 4154 | | |
4146 | 4155 | | |
4147 | 4156 | | |
| 4157 | + | |
4148 | 4158 | | |
4149 | 4159 | | |
| 4160 | + | |
| 4161 | + | |
| 4162 | + | |
| 4163 | + | |
| 4164 | + | |
4150 | 4165 | | |
4151 | 4166 | | |
4152 | 4167 | | |
| |||
4165 | 4180 | | |
4166 | 4181 | | |
4167 | 4182 | | |
4168 | | - | |
| 4183 | + | |
4169 | 4184 | | |
4170 | 4185 | | |
4171 | 4186 | | |
4172 | 4187 | | |
4173 | 4188 | | |
4174 | 4189 | | |
| 4190 | + | |
| 4191 | + | |
| 4192 | + | |
4175 | 4193 | | |
4176 | 4194 | | |
4177 | 4195 | | |
| |||
Lines changed: 51 additions & 0 deletions
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
153 | 153 | | |
154 | 154 | | |
155 | 155 | | |
| 156 | + | |
| 157 | + | |
| 158 | + | |
| 159 | + | |
| 160 | + | |
| 161 | + | |
| 162 | + | |
| 163 | + | |
| 164 | + | |
| 165 | + | |
156 | 166 | | |
157 | 167 | | |
158 | 168 | | |
| |||
320 | 330 | | |
321 | 331 | | |
322 | 332 | | |
| 333 | + | |
| 334 | + | |
| 335 | + | |
| 336 | + | |
| 337 | + | |
| 338 | + | |
| 339 | + | |
323 | 340 | | |
324 | 341 | | |
325 | 342 | | |
| |||
342 | 359 | | |
343 | 360 | | |
344 | 361 | | |
| 362 | + | |
| 363 | + | |
| 364 | + | |
| 365 | + | |
| 366 | + | |
| 367 | + | |
345 | 368 | | |
346 | 369 | | |
347 | 370 | | |
| |||
378 | 401 | | |
379 | 402 | | |
380 | 403 | | |
| 404 | + | |
| 405 | + | |
| 406 | + | |
| 407 | + | |
| 408 | + | |
| 409 | + | |
| 410 | + | |
| 411 | + | |
| 412 | + | |
| 413 | + | |
| 414 | + | |
| 415 | + | |
| 416 | + | |
| 417 | + | |
| 418 | + | |
| 419 | + | |
| 420 | + | |
| 421 | + | |
| 422 | + | |
| 423 | + | |
| 424 | + | |
| 425 | + | |
| 426 | + | |
| 427 | + | |
| 428 | + | |
| 429 | + | |
| 430 | + | |
| 431 | + | |
381 | 432 | | |
382 | 433 | | |
383 | 434 | | |
| |||
0 commit comments