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
9 changes: 7 additions & 2 deletions homeassistant/components/yeelight/scanner.py
Original file line number Diff line number Diff line change
Expand Up @@ -10,7 +10,7 @@
from async_upnp_client.search import SsdpSearchListener

from homeassistant import config_entries
from homeassistant.components import network
from homeassistant.components import network, ssdp
from homeassistant.core import HomeAssistant, callback
from homeassistant.helpers.event import async_call_later, async_track_time_interval

Expand Down Expand Up @@ -161,7 +161,12 @@ def _async_start_flow(*_):
self._hass.config_entries.flow.async_init(
DOMAIN,
context={"source": config_entries.SOURCE_SSDP},
data=response,
data=ssdp.SsdpServiceInfo(
ssdp_usn="",
ssdp_st=SSDP_ST,
ssdp_headers=response,
upnp={},
),
)
)

Expand Down
4 changes: 2 additions & 2 deletions tests/components/yeelight/__init__.py
Original file line number Diff line number Diff line change
Expand Up @@ -182,8 +182,8 @@ def _generate_fake_ssdp_listener(*args, **kwargs):
info = None
if not no_device:
info = ssdp.SsdpServiceInfo(
ssdp_usn="mock_usn",
ssdp_st="mock_st",
ssdp_usn="",
ssdp_st=scanner.SSDP_ST,
upnp={},
ssdp_headers=capabilities or CAPABILITIES,
)
Expand Down