Skip to content

Fix validator issues#4142

Merged
springfall2008 merged 2 commits into
mainfrom
fix/validator
Jul 2, 2026
Merged

Fix validator issues#4142
springfall2008 merged 2 commits into
mainfrom
fix/validator

Conversation

@springfall2008

Copy link
Copy Markdown
Owner

No description provided.

Copilot AI review requested due to automatic review settings June 28, 2026 18:03

Copilot AI left a comment

Copy link
Copy Markdown
Contributor

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 addresses configuration validation and related UI rendering behavior by adding validator-focused test coverage and refining how the web UI decides whether to treat dotted strings as Home Assistant entity IDs.

Changes:

  • Update render_type() in the web UI to avoid attempting HA entity resolution for plain string schema fields that happen to contain dots (e.g., hostnames).
  • Add a comprehensive validate_config() test suite covering APPS_SCHEMA type validation cases.
  • Register the new validator test in the unit test runner.

Reviewed changes

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

File Description
apps/predbat/web.py Adjusts entity-resolution logic for dotted strings during config rendering.
apps/predbat/unit_test.py Registers the new APPS_SCHEMA validator test in the test runner.
apps/predbat/tests/test_validate_config.py Adds validator test coverage for APPS_SCHEMA types and sensor-type behaviors.

Comment thread apps/predbat/web.py
@springfall2008 springfall2008 merged commit 1dfd280 into main Jul 2, 2026
1 check passed
@springfall2008 springfall2008 deleted the fix/validator branch July 2, 2026 16:07
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