1
0
mirror of https://github.com/esphome/esphome.git synced 2025-03-13 14:18:14 +00:00

improve error message

This commit is contained in:
J. Nick Koston 2025-02-23 18:34:45 -05:00
parent 95a5b62cc6
commit a15715e646
No known key found for this signature in database

View File

@ -205,9 +205,11 @@ def validate_remaining_connections(config):
if used_slots <= config[CONF_MAX_CONNECTIONS]:
return config
raise cv.Invalid(
f"Exceeded {CONF_MAX_CONNECTIONS}: "
f"Requested {used_slots} of configured maximum {config[CONF_MAX_CONNECTIONS]}: "
"Decrease the number of BLE clients or increase the maximum connections."
f"Exceeded `{CONF_MAX_CONNECTIONS}`: "
f"Components attempted to consume {used_slots} slot(s) out of available "
f"configured maximum {config[CONF_MAX_CONNECTIONS]} connection slots; "
f"Decrease the number of BLE clients or increase "
f"`{CONF_MAX_CONNECTIONS}` to {used_slots}."
)