From e777bbd0245faf39dada20989a999f463ba0ed3d Mon Sep 17 00:00:00 2001 From: Pascal Vizeli Date: Tue, 24 Jul 2018 22:00:46 +0200 Subject: [PATCH] Fix bug with proxy (#599) --- hassio/homeassistant.py | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/hassio/homeassistant.py b/hassio/homeassistant.py index d7b34a762..3eb3bde4f 100644 --- a/hassio/homeassistant.py +++ b/hassio/homeassistant.py @@ -380,10 +380,12 @@ class HomeAssistant(JsonConfig, CoreSysAttributes): url = f"{self.api_url}/{path}" headers = {} + # Passthrough content type if content_type is not None: headers[hdrs.CONTENT_TYPE] = content_type - elif self.api_password: + # Set old API Password + if self.api_password: headers[HEADER_HA_ACCESS] = self.api_password for _ in (1, 2):