Skip to content

Fix CTPlus panel export parsing - #4

Merged
josh2893 merged 1 commit into
mainfrom
fix/ctplus-export-newlines-3.4.4
Oct 2, 2026
Merged

josh2893 merged 1 commit into
mainfrom
fix/ctplus-export-newlines-3.4.4

Conversation

@josh2893

@josh2893 josh2893 commented Oct 2, 2026

Copy link
Copy Markdown
Owner

Summary

  • accept literal control characters that CTPlus writes inside quoted export fields
  • sanitise control characters from imported Home Assistant entity names
  • keep a genuinely malformed optional export from preventing the integration from starting
  • add regression coverage and bump the integration to 3.4.4

Evidence

The supplied CTPlus export.panel contains literal trailing newlines in a macro description and an event-flag description. Python's strict JSON decoder fails at the first newline before object names can be imported. The updated parser successfully loads the complete supplied export: 4 areas, 34 inputs, 9 doors, 59 relays and 4 RAS objects.

No site-specific export data is included in this pull request.

Validation

  • pytest tests/ -q: 228 passed
  • python tools/validate_project.py: all checks passed
  • git diff --check: passed
  • replayed 800 frames from an existing debug dump against the current main baseline: no decoding changes

CTPlus generated macro and event-flag descriptions with literal newlines inside quoted JSON strings. Accept those control characters, sanitise imported names, and keep malformed optional exports from aborting integration setup.
@josh2893
josh2893 merged commit 6b3340a into main Oct 2, 2026
3 checks passed
@josh2893
josh2893 deleted the fix/ctplus-export-newlines-3.4.4 branch October 2, 2026 08:43
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.

1 participant