Repository navigation
fix: use probatio schemas on Home Assistant 2026.10 and later - #159
Merged
Merged
Conversation
Home Assistant 2026.10 replaced voluptuous with probatio and now types async_show_form's data_schema as probatio.Schema, so the lint job's mypy step fails on dev (scheduled run of 2026-10-05) and on every pull request. voluptuous is also no longer a Home Assistant dependency. Import probatio as vol from 2026.10 on and voluptuous before that. The choice goes by version, not by whether probatio imports: 2026.9 already installs probatio but still expects voluptuous schemas. The pre-commit mypy hook types against the latest stable release (2026.9) and the lint job against the one pytest-homeassistant-custom-component pins (2026.10), so the two config flow schemas are annotated Any. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com> Claude-Session: https://claude.ai/code/session_012VjGcBURcFQJMzcFaFvciV
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Problem
The
Lint & pre-commitjob is red ondev(scheduled run of 2026-10-05) and on every pull request. Home Assistant 2026.10 replaced voluptuous with probatio and now typesasync_show_form(data_schema=...)asprobatio.Schema:(6×). voluptuous is also no longer a Home Assistant dependency; it is only still installed through other packages.
Change
__init__.pyandconfig_flow.pyimportprobatio as volon Home Assistant ≥ 2026.10 andvoluptuousbefore that. The choice goes by version (MAJOR_VERSION/MINOR_VERSION), not by whetherprobatioimports: 2026.9 already installs probatio but still expects voluptuous schemas.Any, so neither run needs an ignore.Validation
mypyon Python 3.14 / Home Assistant 2026.10.0b0: no issues (6 errors before)pre-commit run --all-files(hook on Home Assistant 2026.9.4): passespytest: 95 passed on Python 3.14 / Home Assistant 2026.10.0b0 (probatio path) and on Python 3.13 / Home Assistant 2026.2.3 (voluptuous path)🤖 Generated with Claude Code
https://claude.ai/code/session_012VjGcBURcFQJMzcFaFvciV
Generated by Claude Code