From 7f2b7340b9f890f4f87211f42067b5e4f291d833 Mon Sep 17 00:00:00 2001 From: Joakim Plate Date: Sat, 7 Jan 2023 10:52:46 +0100 Subject: [PATCH] Validate length of rfxtrx identifier (#85352) --- homeassistant/components/rfxtrx/__init__.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/homeassistant/components/rfxtrx/__init__.py b/homeassistant/components/rfxtrx/__init__.py index 9c4f85d2f99..de8a9fc6b8d 100644 --- a/homeassistant/components/rfxtrx/__init__.py +++ b/homeassistant/components/rfxtrx/__init__.py @@ -441,7 +441,7 @@ def get_device_tuple_from_identifiers( identifiers: set[tuple[str, str]] ) -> DeviceTuple | None: """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: return None # work around legacy identifier, being a multi tuple value