Skip to content

Fix/gateway json#4020

Merged
springfall2008 merged 5 commits into
mainfrom
fix/gateway_json
Jun 6, 2026
Merged

Fix/gateway json#4020
springfall2008 merged 5 commits into
mainfrom
fix/gateway_json

Conversation

@springfall2008
Copy link
Copy Markdown
Owner

No description provided.

Copilot AI review requested due to automatic review settings June 6, 2026 13:54
Copy link
Copy Markdown
Contributor

Copilot AI left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Pull request overview

This PR improves the Gateway MQTT component’s handling of gateway_inverter_serial when it is provided as a JSON-encoded string (e.g. a JSON array), adds unit tests covering the new parsing behavior, and bumps the PredBat version.

Changes:

  • Parse JSON-encoded gateway_inverter_serial strings in GatewayMQTT.initialize() (arrays become lists; non-arrays are stringified and wrapped).
  • Add tests for JSON array/object/invalid-JSON handling of the serial filter.
  • Bump THIS_VERSION and add a couple of local/dev ignore entries to .gitignore.

Reviewed changes

Copilot reviewed 3 out of 4 changed files in this pull request and generated 1 comment.

File Description
apps/predbat/gateway.py Extends serial-filter normalization to support JSON-encoded strings.
apps/predbat/tests/test_gateway.py Adds coverage for the new JSON serial-filter parsing behavior.
apps/predbat/predbat.py Version bump to v8.39.16.
.gitignore Ignores additional local/dev artifacts.

Comment thread apps/predbat/gateway.py
pre-commit-ci-lite Bot and others added 2 commits June 6, 2026 13:56
Co-authored-by: Copilot Autofix powered by AI <175728472+Copilot@users.noreply.github.com>
@springfall2008 springfall2008 merged commit e38d6a9 into main Jun 6, 2026
1 check passed
@springfall2008 springfall2008 deleted the fix/gateway_json branch June 6, 2026 18:02
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants