Fix bug with proxy (#599)

This commit is contained in:
Pascal Vizeli 2018-07-24 22:00:46 +02:00 committed by GitHub
parent 2116d56124
commit e777bbd024
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23

View File

@ -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):