Add multi-phase support for VZLogger powermeter#332
Conversation
Accept comma-separated UUIDs in the VZLOGGER section so 3-phase smart meters return one value per phase. UUIDs are fetched in parallel via asyncio.gather. Single-UUID configs continue to return a one-element list, matching the str | list[str] idiom used by Tasmota and JSON HTTP.
|
Warning Rate limit exceeded
Your organization is not enrolled in usage-based pricing. Contact your admin to enable usage-based pricing to continue reviews beyond the rate limit, or try again in 2 minutes and 51 seconds. ⌛ How to resolve this issue?After the wait time has elapsed, a review can be triggered using the We recommend that you space out your commits to avoid hitting the rate limit. 🚦 How do rate limits work?CodeRabbit enforces hourly rate limits for each developer per organization. Our paid plans have higher rate limits than the trial, open-source and free plans. In all cases, we re-allow further reviews after a brief timeout. Please see our FAQ for further information. ℹ️ Review info⚙️ Run configurationConfiguration used: Organization UI Review profile: CHILL Plan: Pro Run ID: 📒 Files selected for processing (6)
✨ Finishing Touches🧪 Generate unit tests (beta)
Thanks for using CodeRabbit! It's free for OSS, and your support helps us grow. If you like it, consider giving us a shout-out. Comment |
Summary
Added support for multi-phase power meters in the VZLogger integration by allowing comma-separated UUID values to be configured. Each phase is now fetched in parallel for improved performance.
Key Changes
VZLogger.__init__()to accept either a single UUID string or a list of UUIDs, normalizing both to an internal listget_json()to accept a UUID parameter, enabling per-UUID queriesget_powermeter_watts()to fetch all phase UUIDs in parallel usingasyncio.gather()and return a list of power values (one per phase)asyncioimport to support concurrent phase fetching_split_labels()utilitytest_vzlogger_three_phase()validating multi-phase functionality and parallel requestsImplementation Details
https://claude.ai/code/session_01ERnB6Z8sVcSgbERfKv2SAT