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: 5 additions & 4 deletions homeassistant/components/huawei_lte/config_flow.py
Original file line number Diff line number Diff line change
Expand Up @@ -276,11 +276,12 @@ async def async_step_ssdp(
if TYPE_CHECKING:
assert discovery_info.ssdp_location
url = url_normalize(
discovery_info.upnp.get(
ATTR_UPNP_PRESENTATION_URL,
f"http://{urlparse(discovery_info.ssdp_location).hostname}/",
)
discovery_info.upnp.get(ATTR_UPNP_PRESENTATION_URL)
or f"http://{urlparse(discovery_info.ssdp_location).hostname}/"
)
if TYPE_CHECKING:
# url_normalize only returns None if passed None, and we don't do that
assert url is not None

unique_id = discovery_info.upnp.get(
ATTR_UPNP_SERIAL, discovery_info.upnp[ATTR_UPNP_UDN]
Expand Down
2 changes: 1 addition & 1 deletion homeassistant/components/huawei_lte/manifest.json
Original file line number Diff line number Diff line change
Expand Up @@ -9,7 +9,7 @@
"requirements": [
"huawei-lte-api==1.11.0",
"stringcase==1.2.0",
"url-normalize==2.2.0"
"url-normalize==2.2.1"
],
"ssdp": [
{
Expand Down
14 changes: 8 additions & 6 deletions homeassistant/components/syncthru/config_flow.py
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
"""Config flow for Samsung SyncThru."""

import re
from typing import Any
from typing import TYPE_CHECKING, Any
from urllib.parse import urlparse

from pysyncthru import ConnectionMode, SyncThru, SyncThruAPINotSupported
Expand Down Expand Up @@ -44,12 +44,14 @@ async def async_step_ssdp(
await self.async_set_unique_id(discovery_info.upnp[ATTR_UPNP_UDN])
self._abort_if_unique_id_configured()

self.url = url_normalize(
discovery_info.upnp.get(
ATTR_UPNP_PRESENTATION_URL,
f"http://{urlparse(discovery_info.ssdp_location or '').hostname}/",
)
norm_url = url_normalize(
discovery_info.upnp.get(ATTR_UPNP_PRESENTATION_URL)
or f"http://{urlparse(discovery_info.ssdp_location or '').hostname}/"
)
if TYPE_CHECKING:
# url_normalize only returns None if passed None, and we don't do that
assert norm_url is not None
self.url = norm_url

for existing_entry in (
x for x in self._async_current_entries() if x.data[CONF_URL] == self.url
Expand Down
2 changes: 1 addition & 1 deletion homeassistant/components/syncthru/manifest.json
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,7 @@
"documentation": "https://www.home-assistant.io/integrations/syncthru",
"iot_class": "local_polling",
"loggers": ["pysyncthru"],
"requirements": ["PySyncThru==0.8.0", "url-normalize==2.2.0"],
"requirements": ["PySyncThru==0.8.0", "url-normalize==2.2.1"],
"ssdp": [
{
"deviceType": "urn:schemas-upnp-org:device:Printer:1",
Expand Down
2 changes: 1 addition & 1 deletion homeassistant/components/zwave_me/manifest.json
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,7 @@
"config_flow": true,
"documentation": "https://www.home-assistant.io/integrations/zwave_me",
"iot_class": "local_push",
"requirements": ["zwave-me-ws==0.4.3", "url-normalize==2.2.0"],
"requirements": ["zwave-me-ws==0.4.3", "url-normalize==2.2.1"],
"zeroconf": [
{
"type": "_hap._tcp.local.",
Expand Down
2 changes: 1 addition & 1 deletion requirements_all.txt

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

2 changes: 1 addition & 1 deletion requirements_test_all.txt

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.