Allow auto setting of ble client id if there is only 1 in config (#4125)

This commit is contained in:
Jesse Hills 2022-11-30 10:59:02 +13:00 committed by GitHub
parent 3669320398
commit 2b4fdd6c39
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23

View file

@ -66,7 +66,7 @@ CONF_BLE_CLIENT_ID = "ble_client_id"
BLE_CLIENT_SCHEMA = cv.Schema(
{
cv.Required(CONF_BLE_CLIENT_ID): cv.use_id(BLEClient),
cv.GenerateID(CONF_BLE_CLIENT_ID): cv.use_id(BLEClient),
}
)
@ -78,7 +78,7 @@ async def register_ble_node(var, config):
BLE_WRITE_ACTION_SCHEMA = cv.Schema(
{
cv.Required(CONF_ID): cv.use_id(BLEClient),
cv.GenerateID(CONF_ID): cv.use_id(BLEClient),
cv.Required(CONF_SERVICE_UUID): esp32_ble_tracker.bt_uuid,
cv.Required(CONF_CHARACTERISTIC_UUID): esp32_ble_tracker.bt_uuid,
cv.Required(CONF_VALUE): cv.templatable(cv.ensure_list(cv.hex_uint8_t)),