mirror of
https://github.com/home-assistant/core.git
synced 2025-07-23 05:07:41 +00:00
Validate length of rfxtrx identifier (#85352)
This commit is contained in:
parent
dfca3c2448
commit
7f2b7340b9
@ -441,7 +441,7 @@ def get_device_tuple_from_identifiers(
|
|||||||
identifiers: set[tuple[str, str]]
|
identifiers: set[tuple[str, str]]
|
||||||
) -> DeviceTuple | None:
|
) -> DeviceTuple | None:
|
||||||
"""Calculate the device tuple from a device entry."""
|
"""Calculate the device tuple from a device entry."""
|
||||||
identifier = next((x for x in identifiers if x[0] == DOMAIN), None)
|
identifier = next((x for x in identifiers if x[0] == DOMAIN and len(x) == 4), None)
|
||||||
if not identifier:
|
if not identifier:
|
||||||
return None
|
return None
|
||||||
# work around legacy identifier, being a multi tuple value
|
# work around legacy identifier, being a multi tuple value
|
||||||
|
Loading…
x
Reference in New Issue
Block a user