Commit 3808907
fix: query area/entity registries for accurate area count in overview (#216)
The ha_get_overview tool was returning total_areas: 0 because it tried to
get area_id from entity state attributes, but Home Assistant stores area
assignments in the entity registry, not state attributes.
This fix:
- Queries config/area_registry/list for accurate total_areas count
- Queries config/entity_registry/list to build entity-to-area mappings
- Uses entity registry data for area_analysis instead of state attributes
Fixes #203
🤖 Generated with [Claude Code](https://claude.com/claude-code)
Co-authored-by: Claude <noreply@anthropic.com>1 parent c570bdf commit 3808907
1 file changed
Lines changed: 33 additions & 3 deletions
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
240 | 240 | | |
241 | 241 | | |
242 | 242 | | |
| 243 | + | |
| 244 | + | |
| 245 | + | |
| 246 | + | |
| 247 | + | |
| 248 | + | |
| 249 | + | |
| 250 | + | |
| 251 | + | |
| 252 | + | |
| 253 | + | |
| 254 | + | |
| 255 | + | |
| 256 | + | |
| 257 | + | |
| 258 | + | |
| 259 | + | |
| 260 | + | |
| 261 | + | |
| 262 | + | |
| 263 | + | |
| 264 | + | |
| 265 | + | |
| 266 | + | |
| 267 | + | |
| 268 | + | |
| 269 | + | |
| 270 | + | |
| 271 | + | |
| 272 | + | |
243 | 273 | | |
244 | 274 | | |
245 | 275 | | |
| |||
285 | 315 | | |
286 | 316 | | |
287 | 317 | | |
288 | | - | |
289 | | - | |
| 318 | + | |
| 319 | + | |
290 | 320 | | |
291 | 321 | | |
292 | 322 | | |
| |||
374 | 404 | | |
375 | 405 | | |
376 | 406 | | |
377 | | - | |
| 407 | + | |
378 | 408 | | |
379 | 409 | | |
380 | 410 | | |
| |||
0 commit comments