mirror of
https://github.com/esphome/esphome.git
synced 2025-10-06 11:53:45 +01:00
preen
This commit is contained in:
@@ -294,22 +294,22 @@ def validate_connection_slots(max_connections: int) -> None:
|
||||
|
||||
slot_users = ", ".join(used_slots)
|
||||
|
||||
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:
|
||||
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. "
|
||||
"Components: %s",
|
||||
num_used,
|
||||
max_connections,
|
||||
num_used,
|
||||
slot_users,
|
||||
)
|
||||
|
||||
|
||||
def final_validation(config):
|
||||
validate_variant(config)
|
||||
|
Reference in New Issue
Block a user