Skip to content

Commit

Permalink
Bump ´aiohttp´ from 3.9.3 to 3.9.4 (#403)
Browse files Browse the repository at this point in the history
Signed-off-by: Ludy87 <[email protected]>
  • Loading branch information
Ludy87 authored Apr 13, 2024
1 parent f14f210 commit 36f2fd5
Show file tree
Hide file tree
Showing 4 changed files with 13 additions and 10 deletions.
7 changes: 4 additions & 3 deletions custom_components/xplora_watch/coordinator.py
Original file line number Diff line number Diff line change
Expand Up @@ -265,9 +265,10 @@ async def openstreetmap(self):
"""Get OpenStreetMap.org information for the location.."""
try:
language = self._entry.options.get(CONF_LANGUAGE, self._entry.data.get(CONF_LANGUAGE, DEFAULT_LANGUAGE))
async with aiohttp.ClientSession(timeout=aiohttp.ClientTimeout(DEFAULT_TIMEOUT)) as session, session.get(
URL_OPENSTREETMAP.format(self.lat, self.lng, language)
) as response:
async with (
aiohttp.ClientSession(timeout=aiohttp.ClientTimeout(DEFAULT_TIMEOUT)) as session,
session.get(URL_OPENSTREETMAP.format(self.lat, self.lng, language)) as response,
):
res: dict[str, Any] = await response.json()
self.licence = res.get(ATTR_TRACKER_LICENCE, None)
address: dict[str, str] = res.get(ATTR_TRACKER_ADDR, {})
Expand Down
3 changes: 2 additions & 1 deletion custom_components/xplora_watch/geocoder.py
Original file line number Diff line number Diff line change
Expand Up @@ -19,6 +19,7 @@

import backoff
import requests
from security import safe_requests

try:
import aiohttp
Expand Down Expand Up @@ -285,7 +286,7 @@ def _opencage_request(self, params):
if self.session:
response = self.session.get(self.url, params=params, headers=self._opencage_headers("aiohttp"))
else:
response = requests.get(
response = safe_requests.get(
self.url, params=params, headers=self._opencage_headers("requests"), timeout=DEFAULT_TIMEOUT
)

Expand Down
11 changes: 6 additions & 5 deletions custom_components/xplora_watch/manifest.json
Original file line number Diff line number Diff line change
Expand Up @@ -9,14 +9,15 @@
"iot_class": "local_polling",
"issue_tracker": "https://github.com/Ludy87/xplora_watch/issues",
"requirements": [
"pyxplora_api==2.12.6",
"pyxplora_api==2.12.7",
"backoff==2.2.1",
"requests==2.31.0",
"aiohttp==3.9.3",
"aiohttp==3.9.4",
"geopy==2.4.1",
"dataclasses-json==0.6.3",
"dataclasses-json==0.6.4",
"pydub",
"marshmallow-enum"
"marshmallow-enum",
"security==1.2.1"
],
"version": "v2.13.7"
"version": "v2.13.8"
}
2 changes: 1 addition & 1 deletion hacs.json
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@
"name": "Xplora\u00ae Watch",
"zip_release": true,
"render_readme": true,
"homeassistant": "2024.2.0",
"homeassistant": "2024.4.3",
"hacs": "1.34.0",
"filename": "xplora_watch.zip"
}

0 comments on commit 36f2fd5

Please sign in to comment.