Fix mix of aiohttp and requests in ZAMG (#74628)

This commit is contained in:
Franck Nijhof 2022-07-07 16:59:49 +02:00 committed by GitHub
parent 4e2de2479a
commit c01f7d75d5
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23

View file

@ -10,7 +10,6 @@ import logging
import os
from typing import Union
from aiohttp.hdrs import USER_AGENT
import requests
import voluptuous as vol
@ -275,7 +274,7 @@ class ZamgData:
"""The class for handling the data retrieval."""
API_URL = "http://www.zamg.ac.at/ogd/"
API_HEADERS = {USER_AGENT: f"home-assistant.zamg/ {__version__}"}
API_HEADERS = {"User-Agent": f"home-assistant.zamg/ {__version__}"}
def __init__(self, station_id):
"""Initialize the probe."""