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