Skip to content

Commit

Permalink
🐛 v2.7.7-beta (#176)
Browse files Browse the repository at this point in the history
Signed-off-by: Ludy87 <[email protected]>
  • Loading branch information
Ludy87 authored Feb 27, 2023
1 parent 62826ce commit c16d650
Show file tree
Hide file tree
Showing 2 changed files with 8 additions and 3 deletions.
7 changes: 6 additions & 1 deletion custom_components/xplora_watch/coordinator.py
Original file line number Diff line number Diff line change
@@ -1,6 +1,7 @@
"""Coordinator for Xplora® Watch Version 2"""
from __future__ import annotations

import asyncio
import logging
from datetime import datetime, timedelta
from typing import Any, Union
Expand Down Expand Up @@ -120,7 +121,7 @@ async def _async_update_data(self, targets: list[str] = None, new_data: dict = N
if self.data:
self.watch_entry.update(self.data)

await self.init(aiohttp_client.async_create_clientsession(self.hass))
await self.init(aiohttp_client.async_create_clientsession(self.hass, timeout=aiohttp.ClientTimeout(15)))
_LOGGER.debug("pyxplora_api lib version: %s", self.controller.version())

# Get the list of watch UUIDs
Expand All @@ -139,6 +140,7 @@ async def _async_update_data(self, targets: list[str] = None, new_data: dict = N
self.data = self.watch_entry
else:
self.data.update(self.watch_entry)
self.async_set_updated_data(self.data)
return self.data

async def data_loop(self, wuids, message_limit, remove_message):
Expand All @@ -148,6 +150,9 @@ async def data_loop(self, wuids, message_limit, remove_message):
device = self.controller.getDevice(wuid=wuid)
res_chats = await self.controller.getWatchChatsRaw(wuid, limit=message_limit, show_del_msg=remove_message)
chats = ChatsNew.from_dict(res_chats).to_dict()
await self.controller.getStartTrackingWatch(wuid)
await asyncio.sleep(5)
await self.controller.getEndTrackingWatch(wuid)
watch_location = await self.controller.loadWatchLocation(wuid)

# Update the watch data
Expand Down
4 changes: 2 additions & 2 deletions custom_components/xplora_watch/manifest.json
Original file line number Diff line number Diff line change
Expand Up @@ -9,10 +9,10 @@
"iot_class": "local_polling",
"issue_tracker": "https://github.com/Ludy87/xplora_watch/issues",
"requirements": [
"pyxplora_api==2.5.22",
"pyxplora_api==2.5.26",
"geopy==2.2.0",
"dataclasses-json",
"pydub"
],
"version": "v2.7.6"
"version": "v2.7.7"
}

0 comments on commit c16d650

Please sign in to comment.