mirror of
https://github.com/home-assistant/core.git
synced 2025-12-24 21:06:19 +00:00
Add support for scanners that do not provide connectable devices (#77132)
This commit is contained in:
@@ -14,7 +14,7 @@ from __future__ import annotations
|
||||
|
||||
# fmt: off
|
||||
|
||||
BLUETOOTH: list[dict[str, str | int | list[int]]] = {}
|
||||
BLUETOOTH: list[dict[str, bool | str | int | list[int]]] = {}
|
||||
""".strip()
|
||||
|
||||
|
||||
@@ -36,7 +36,11 @@ def generate_and_validate(integrations: list[dict[str, str]]):
|
||||
for entry in match_types:
|
||||
match_list.append({"domain": domain, **entry})
|
||||
|
||||
return BASE.format(json.dumps(match_list, indent=4))
|
||||
return BASE.format(
|
||||
json.dumps(match_list, indent=4)
|
||||
.replace('": true', '": True')
|
||||
.replace('": false', '": False')
|
||||
)
|
||||
|
||||
|
||||
def validate(integrations: dict[str, Integration], config: Config):
|
||||
|
||||
@@ -197,6 +197,7 @@ MANIFEST_SCHEMA = vol.Schema(
|
||||
vol.Optional("bluetooth"): [
|
||||
vol.Schema(
|
||||
{
|
||||
vol.Optional("connectable"): bool,
|
||||
vol.Optional("service_uuid"): vol.All(str, verify_lowercase),
|
||||
vol.Optional("service_data_uuid"): vol.All(str, verify_lowercase),
|
||||
vol.Optional("local_name"): vol.All(str),
|
||||
|
||||
Reference in New Issue
Block a user