diff --git a/custom_components/irm_kmi/api.py b/custom_components/irm_kmi/api.py index a106fd7..44e53af 100644 --- a/custom_components/irm_kmi/api.py +++ b/custom_components/irm_kmi/api.py @@ -69,6 +69,10 @@ class IrmKmiApiClient: headers: dict | None = None, ) -> any: """Get information from the API.""" + if headers is None: + headers = {'User-Agent': 'github.com/jdejaegh/irm-kmi-ha'} + else: + headers['User-Agent'] = 'github.com/jdejaegh/irm-kmi-ha' try: async with async_timeout.timeout(60):