From 0d598dd6d60d6f40ff640e0b3387d5f451b5300c Mon Sep 17 00:00:00 2001 From: ochlocracy <5885236+ochlocracy@users.noreply.github.com> Date: Tue, 21 Apr 2020 13:46:56 -0400 Subject: [PATCH] Modify requirements for CameraStreamController in Alexa (#34470) --- homeassistant/components/alexa/entities.py | 11 +++++------ tests/components/alexa/test_smart_home.py | 2 +- 2 files changed, 6 insertions(+), 7 deletions(-) diff --git a/homeassistant/components/alexa/entities.py b/homeassistant/components/alexa/entities.py index 0943d1a4e52..e22c5c62db9 100644 --- a/homeassistant/components/alexa/entities.py +++ b/homeassistant/components/alexa/entities.py @@ -791,19 +791,18 @@ class CameraCapabilities(AlexaEntity): yield Alexa(self.hass) def _check_requirements(self): - """Check the hass URL for HTTPS scheme and port 443.""" + """Check the hass URL for HTTPS scheme.""" if "stream" not in self.hass.config.components: - _LOGGER.error( + _LOGGER.debug( "%s requires stream component for AlexaCameraStreamController", self.entity_id, ) return False url = urlparse(network.async_get_external_url(self.hass)) - if url.scheme != "https" or (url.port is not None and url.port != 443): - _LOGGER.error( - "%s requires HTTPS support on port 443 for AlexaCameraStreamController", - self.entity_id, + if url.scheme != "https": + _LOGGER.debug( + "%s requires HTTPS for AlexaCameraStreamController", self.entity_id ) return False diff --git a/tests/components/alexa/test_smart_home.py b/tests/components/alexa/test_smart_home.py index f94091a6741..1bef3a5ae12 100644 --- a/tests/components/alexa/test_smart_home.py +++ b/tests/components/alexa/test_smart_home.py @@ -3802,9 +3802,9 @@ async def test_camera_discovery_without_stream(hass): "url,result", [ ("http://nohttpswrongport.org:8123", 2), - ("https://httpswrongport.org:8123", 2), ("http://nohttpsport443.org:443", 2), ("tls://nohttpsport443.org:443", 2), + ("https://httpsnnonstandport.org:8123", 3), ("https://correctschemaandport.org:443", 3), ("https://correctschemaandport.org", 3), ],