Skip to content

Commit

Permalink
Suppress Upnp parsing errors in SamsungTV (#69664)
Browse files Browse the repository at this point in the history
  • Loading branch information
epenet committed Apr 8, 2022
1 parent 5076437 commit 2ad0967
Showing 1 changed file with 4 additions and 1 deletion.
5 changes: 4 additions & 1 deletion homeassistant/components/samsungtv/media_player.py
Expand Up @@ -263,7 +263,10 @@ async def _async_startup_dmr(self) -> None:
if self._dmr_device is None:
session = async_get_clientsession(self.hass)
upnp_requester = AiohttpSessionRequester(session)
upnp_factory = UpnpFactory(upnp_requester)
# Set non_strict to avoid invalid data sent by Samsung TV:
# Got invalid value for <UpnpStateVariable(PlaybackStorageMedium, string)>:
# NETWORK,NONE
upnp_factory = UpnpFactory(upnp_requester, non_strict=True)
upnp_device: UpnpDevice | None = None
with contextlib.suppress(UpnpConnectionError):
upnp_device = await upnp_factory.async_create_device(
Expand Down

0 comments on commit 2ad0967

Please sign in to comment.