From 9b13350b01d18c8a5f61236e3cbcc53ae9830ace Mon Sep 17 00:00:00 2001 From: Johan Josua Storm Date: Wed, 26 May 2021 08:01:35 +0200 Subject: [PATCH] Replace wrong domain returned from xbox api revisited (#51074) * Added replacement http to https Somehow the fix of replacing the domain doesn't work on android, so explicit replacement of http to https protocol is needed. * Update homeassistant/components/xbox/base_sensor.py Co-authored-by: Jason Hunter Co-authored-by: Jason Hunter --- homeassistant/components/xbox/base_sensor.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/homeassistant/components/xbox/base_sensor.py b/homeassistant/components/xbox/base_sensor.py index 894213fd94c..c463b31d3c5 100644 --- a/homeassistant/components/xbox/base_sensor.py +++ b/homeassistant/components/xbox/base_sensor.py @@ -55,7 +55,7 @@ class XboxBaseSensorEntity(CoordinatorEntity): # We need to also remove the 'mode=Padding' query because with it, it results in an error 400. url = URL(self.data.display_pic) if url.host == "images-eds.xboxlive.com": - url = url.with_host("images-eds-ssl.xboxlive.com") + url = url.with_host("images-eds-ssl.xboxlive.com").with_scheme("https") query = dict(url.query) query.pop("mode", None) return str(url.with_query(query))