Bug Description
The config_flow.py has a hardcoded maximum length of 10 characters for the serial number (SN) field in both CONFIG_SCHEMA and OPTION_SCHEMA:
vol.Required(CONF_SN): vol.All(
str, vol.Length(max=10, msg="invalid_sn_length")
),
This prevents users from entering serial numbers longer than 10 characters. The SolaX EV Charger (X3-EVC series) can have serial numbers of 14 characters (e.g. C32203XXXXXXXX), making it impossible to set up the integration via the UI.
Impact
- Integration cannot be configured at all for affected devices
- Workaround requires manually patching
config_flow.py after every HACS update
Steps to Reproduce
- Install integration via HACS
- Go to Settings → Devices & Services → Add Integration → SolaX HTTP
- Enter a serial number longer than 10 characters
- UI rejects input with
invalid_sn_length error
Expected Behavior
The SN field should accept serial numbers of at least 20 characters to accommodate all current and future SolaX EV Charger models.
Suggested Fix
In config_flow.py, change both occurrences of max=10 to max=20 (or remove the length restriction entirely):
# CONFIG_SCHEMA
vol.Required(CONF_SN): vol.All(
str, vol.Length(max=20, msg="invalid_sn_length")
),
# OPTION_SCHEMA
vol.Required(CONF_SN): vol.All(str, vol.Length(max=20)),
Environment
- Integration version: v1.4.1
- Home Assistant: 2026.03.x
- EV Charger model: SolaX X3-EVC (serial number prefix C322)
Bug Description
The
config_flow.pyhas a hardcoded maximum length of 10 characters for the serial number (SN) field in bothCONFIG_SCHEMAandOPTION_SCHEMA:This prevents users from entering serial numbers longer than 10 characters. The SolaX EV Charger (X3-EVC series) can have serial numbers of 14 characters (e.g.
C32203XXXXXXXX), making it impossible to set up the integration via the UI.Impact
config_flow.pyafter every HACS updateSteps to Reproduce
invalid_sn_lengtherrorExpected Behavior
The SN field should accept serial numbers of at least 20 characters to accommodate all current and future SolaX EV Charger models.
Suggested Fix
In
config_flow.py, change both occurrences ofmax=10tomax=20(or remove the length restriction entirely):Environment