Replaces aiohttp.hdrs CONTENT_TYPE with plain string for the Swisscom integration (#76568)

pull/76578/head
Dave 2022-08-10 23:57:58 +02:00 committed by GitHub
parent 58ac3eee3b
commit 2bab6447a9
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
1 changed files with 1 additions and 2 deletions

View File

@ -4,7 +4,6 @@ from __future__ import annotations
from contextlib import suppress
import logging
from aiohttp.hdrs import CONTENT_TYPE
import requests
import voluptuous as vol
@ -79,7 +78,7 @@ class SwisscomDeviceScanner(DeviceScanner):
def get_swisscom_data(self):
"""Retrieve data from Swisscom and return parsed result."""
url = f"http://{self.host}/ws"
headers = {CONTENT_TYPE: "application/x-sah-ws-4-call+json"}
headers = {"Content-Type": "application/x-sah-ws-4-call+json"}
data = """
{"service":"Devices", "method":"get",
"parameters":{"expression":"lan and not self"}}"""