diff --git a/homeassistant/components/zeroconf/__init__.py b/homeassistant/components/zeroconf/__init__.py index e12a7599d4d..2e058c4067c 100644 --- a/homeassistant/components/zeroconf/__init__.py +++ b/homeassistant/components/zeroconf/__init__.py @@ -321,12 +321,11 @@ async def _async_register_hass_zc_service( def _match_against_props(matcher: dict[str, str], props: dict[str, str | None]) -> bool: """Check a matcher to ensure all values in props.""" - return not any( - key - for key in matcher - if key not in props - or not _memorized_fnmatch((props[key] or "").lower(), matcher[key]) - ) + for key, value in matcher.items(): + prop_val = props.get(key) + if prop_val is None or not _memorized_fnmatch(prop_val.lower(), value): + return False + return True def is_homekit_paired(props: dict[str, Any]) -> bool: