1
0
mirror of https://github.com/esphome/esphome.git synced 2025-10-06 20:03:46 +01:00
This commit is contained in:
J. Nick Koston
2025-10-03 17:56:14 -05:00
parent 1570f83fd8
commit d697d5df8b

View File

@@ -294,7 +294,12 @@ def validate_connection_slots(max_connections: int) -> None:
slot_users = ", ".join(used_slots)
if num_used <= IDF_MAX_CONNECTIONS:
if num_used > IDF_MAX_CONNECTIONS:
raise cv.Invalid(
f"BLE components require {num_used} connection slots but maximum is {IDF_MAX_CONNECTIONS}. "
f"Reduce the number of BLE clients. Components: {slot_users}"
)
_LOGGER.warning(
"BLE components require %d connection slot(s) but only %d configured. "
"Please set 'max_connections: %d' in the 'esp32_ble' component. "
@@ -304,11 +309,6 @@ def validate_connection_slots(max_connections: int) -> None:
num_used,
slot_users,
)
else:
raise cv.Invalid(
f"BLE components require {num_used} connection slots but maximum is {IDF_MAX_CONNECTIONS}. "
f"Reduce the number of BLE clients. Components: {slot_users}"
)
def final_validation(config):