Add descriptors to all remaining integrations#2066
Conversation
|
These changes were generated using Claude Code under my supervision. I reviewed and approved all code before submitting. I'm not very familiar with this codebase, so apologies in advance for any mistakes. |
|
@copilot resolve the merge conflicts in this pull request |
6a00163 to
a27ffd7
Compare
Codecov Report❌ Patch coverage is
Additional details and impacted files@@ Coverage Diff @@
## master #2066 +/- ##
==========================================
+ Coverage 83.64% 84.13% +0.48%
==========================================
Files 199 199
Lines 19537 20164 +627
Branches 1063 1063
==========================================
+ Hits 16341 16964 +623
- Misses 3006 3010 +4
Partials 190 190 ☔ View full report in Codecov by Harness. |
rytilahti
left a comment
There was a problem hiding this comment.
Hi @Acrobot and thanks for the PR!
It is a great step forward, I applied a couple of changes:
- Dropping icon and device_class, as these are not necessary for now
- Removing the decoration for one-way actions.
The latter requires some thought to make the interface consistent among integrations, but it can be done in a separate PR.
Adds introspectable interface decorators to 44 integration files that previously lacked them, bringing descriptor coverage from ~12 to ~56 integrations. This enables downstream consumers like Home Assistant to automatically discover available sensors, settings, and their metadata (icons, units, device classes) without hardcoding per-device knowledge. Addresses rytilahti#1617
9c3b138 to
59f8f22
Compare
Adds
@sensorand@settingdecorators to all 44 integration files that previously lacked them. The only integration without static descriptors isgenericmiot, which gets its descriptors dynamically from miotspec files.This brings descriptor coverage from ~12 to ~56 integrations (~550 properties decorated), enabling Home Assistant and other downstream consumers to automatically discover sensors, settings, icons, units, and device classes without per-device hardcoding.
Decorated integrations include: air purifiers (zhimi, airdog), vacuums (dreame, roidmi, g1), fans (dmaker, leshow, zhimi), humidifiers (deerma, shuii), heaters (zhimi), lights (philips, huizuo, ceil), plugs (chuangmi), water purifiers (yunmi), air conditioners (xiaomi, lumi), cameras (chuangmi, aqara), curtains (lumi), air monitors (cgllc), dehumidifiers (nwt), cookers (chunmi), pet dispensers (mmgg), dishwashers (viomi), walkingpads (ksmb), toiletlids (tinymu), relays (pwzn), clocks (zimi), repeaters (xiaomi), speakers (xiaomi), and dual switches (yeelight).
Full test suite: 1286 passed (same as master), no new failures. Ruff clean.
Closes #1617