Conversation
Add Discharging StateCode. Fixes ZeroErrors#19
Update Dependabot config and fix growatt.py style
There was a problem hiding this comment.
Pull request overview
This PR introduces logging infrastructure and refines the development workflow configuration. It replaces print-based error reporting with proper logging in the Growatt inverter module and updates Dependabot to target a develop branch with a more conservative update schedule.
Changes:
- Replaced print statements with structured logging in growatt.py for better production-grade error handling
- Removed unused datetime import from growatt.py
- Reconfigured Dependabot to target develop branch with weekly updates, reduced PR limits, and added automation labels
Reviewed changes
Copilot reviewed 2 out of 2 changed files in this pull request and generated 2 comments.
| File | Description |
|---|---|
| growatt.py | Introduces logging module, removes unused datetime import, replaces print statements with logger.warning() calls for error handling, removes trailing comma from StateCodes dictionary |
| .github/dependabot.yml | Reconfigures Dependabot to target develop branch with weekly schedule, reduced PR limit, added labels and commit prefix, removed reviewer assignments and version ignores |
💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.
| 1: 'Normal', | ||
| 2: 'Discharging', | ||
| 3: 'Fault', | ||
| 3: 'Fault' |
There was a problem hiding this comment.
The trailing comma was removed from the last entry in StateCodes, but ErrorCodes dictionary on line 39 still has a trailing comma. For consistency, both dictionaries should follow the same convention. Python best practice recommends including trailing commas in multi-line dictionary definitions to make diffs cleaner when adding new entries.
| 3: 'Fault' | |
| 3: 'Fault', |
No description provided.