mirror of
https://github.com/home-assistant/core.git
synced 2025-07-17 18:27:09 +00:00
Modify requirements for CameraStreamController in Alexa (#34470)
This commit is contained in:
parent
ef9d9b17bd
commit
0d598dd6d6
@ -791,19 +791,18 @@ class CameraCapabilities(AlexaEntity):
|
|||||||
yield Alexa(self.hass)
|
yield Alexa(self.hass)
|
||||||
|
|
||||||
def _check_requirements(self):
|
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:
|
if "stream" not in self.hass.config.components:
|
||||||
_LOGGER.error(
|
_LOGGER.debug(
|
||||||
"%s requires stream component for AlexaCameraStreamController",
|
"%s requires stream component for AlexaCameraStreamController",
|
||||||
self.entity_id,
|
self.entity_id,
|
||||||
)
|
)
|
||||||
return False
|
return False
|
||||||
|
|
||||||
url = urlparse(network.async_get_external_url(self.hass))
|
url = urlparse(network.async_get_external_url(self.hass))
|
||||||
if url.scheme != "https" or (url.port is not None and url.port != 443):
|
if url.scheme != "https":
|
||||||
_LOGGER.error(
|
_LOGGER.debug(
|
||||||
"%s requires HTTPS support on port 443 for AlexaCameraStreamController",
|
"%s requires HTTPS for AlexaCameraStreamController", self.entity_id
|
||||||
self.entity_id,
|
|
||||||
)
|
)
|
||||||
return False
|
return False
|
||||||
|
|
||||||
|
@ -3802,9 +3802,9 @@ async def test_camera_discovery_without_stream(hass):
|
|||||||
"url,result",
|
"url,result",
|
||||||
[
|
[
|
||||||
("http://nohttpswrongport.org:8123", 2),
|
("http://nohttpswrongport.org:8123", 2),
|
||||||
("https://httpswrongport.org:8123", 2),
|
|
||||||
("http://nohttpsport443.org:443", 2),
|
("http://nohttpsport443.org:443", 2),
|
||||||
("tls://nohttpsport443.org:443", 2),
|
("tls://nohttpsport443.org:443", 2),
|
||||||
|
("https://httpsnnonstandport.org:8123", 3),
|
||||||
("https://correctschemaandport.org:443", 3),
|
("https://correctschemaandport.org:443", 3),
|
||||||
("https://correctschemaandport.org", 3),
|
("https://correctschemaandport.org", 3),
|
||||||
],
|
],
|
||||||
|
Loading…
x
Reference in New Issue
Block a user