Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
5 changes: 4 additions & 1 deletion homeassistant/components/ssdp/__init__.py
Original file line number Diff line number Diff line change
Expand Up @@ -92,7 +92,10 @@ async def _process_entries(self, entries):

entries_to_process.append(entry)

if entry.location not in self._description_cache:
if (
entry.location is not None
and entry.location not in self._description_cache
):
unseen_locations.add(entry.location)

if not entries_to_process:
Expand Down
3 changes: 2 additions & 1 deletion tests/components/ssdp/test_init.py
Original file line number Diff line number Diff line change
Expand Up @@ -10,7 +10,7 @@
from tests.common import mock_coro


async def test_scan_match_st(hass):
async def test_scan_match_st(hass, caplog):
"""Test matching based on ST."""
scanner = ssdp.Scanner(hass, {"mock-domain": [{"st": "mock-st"}]})

Expand Down Expand Up @@ -38,6 +38,7 @@ async def test_scan_match_st(hass):
ssdp.ATTR_SSDP_SERVER: "mock-server",
ssdp.ATTR_SSDP_EXT: "",
}
assert "Failed to fetch ssdp data" not in caplog.text


@pytest.mark.parametrize(
Expand Down