mirror of
https://github.com/home-assistant/core.git
synced 2025-07-24 13:47:35 +00:00
Replaces aiohttp.hdrs CONTENT_TYPE with plain string for the Swisscom integration (#76568)
This commit is contained in:
parent
58ac3eee3b
commit
2bab6447a9
@ -4,7 +4,6 @@ from __future__ import annotations
|
|||||||
from contextlib import suppress
|
from contextlib import suppress
|
||||||
import logging
|
import logging
|
||||||
|
|
||||||
from aiohttp.hdrs import CONTENT_TYPE
|
|
||||||
import requests
|
import requests
|
||||||
import voluptuous as vol
|
import voluptuous as vol
|
||||||
|
|
||||||
@ -79,7 +78,7 @@ class SwisscomDeviceScanner(DeviceScanner):
|
|||||||
def get_swisscom_data(self):
|
def get_swisscom_data(self):
|
||||||
"""Retrieve data from Swisscom and return parsed result."""
|
"""Retrieve data from Swisscom and return parsed result."""
|
||||||
url = f"http://{self.host}/ws"
|
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 = """
|
data = """
|
||||||
{"service":"Devices", "method":"get",
|
{"service":"Devices", "method":"get",
|
||||||
"parameters":{"expression":"lan and not self"}}"""
|
"parameters":{"expression":"lan and not self"}}"""
|
||||||
|
Loading…
x
Reference in New Issue
Block a user