Skip to content

Commit

Permalink
🐛 wrong type definition
Browse files Browse the repository at this point in the history
Signed-off-by: Ludy87 <[email protected]>
  • Loading branch information
Ludy87 committed Feb 5, 2024
1 parent 38b267d commit 0e72198
Show file tree
Hide file tree
Showing 4 changed files with 8 additions and 8 deletions.
2 changes: 1 addition & 1 deletion custom_components/xplora_watch/coordinator.py
Original file line number Diff line number Diff line change
Expand Up @@ -92,7 +92,7 @@ class XploraDataUpdateCoordinator(DataUpdateCoordinator):

def __init__(self, hass: HomeAssistant, entry: ConfigEntry) -> None:
"""Initialize Xplora® data updater."""
self._entry = entry
self._entry: ConfigEntry = entry
self._opencage_apikey = entry.options.get(CONF_OPENCAGE_APIKEY, "")
self._maps = entry.options.get(CONF_MAPS, MAPS[0])
name = f"{DOMAIN}-"
Expand Down
2 changes: 1 addition & 1 deletion custom_components/xplora_watch/manifest.json
Original file line number Diff line number Diff line change
Expand Up @@ -18,5 +18,5 @@
"pydub",
"marshmallow-enum"
],
"version": "v2.13.5"
"version": "v2.13.6"
}
10 changes: 5 additions & 5 deletions custom_components/xplora_watch/services.py
Original file line number Diff line number Diff line change
Expand Up @@ -82,7 +82,7 @@ async def async_setup_services(hass: HomeAssistant, entry_id: str) -> None:

async def async_see(service: ServiceCall) -> None:
kwargs = dict(service.data)
await see_service.async_see(kwargs[ATTR_SERVICE_TARGET] if ATTR_SERVICE_TARGET in kwargs else ["all"], kwargs=kwargs)
await see_service.async_see(kwargs.get(ATTR_SERVICE_TARGET, ["all"]), kwargs=kwargs)

async def async_delete_message_from_app(service: ServiceCall) -> None:
kwargs = dict(service.data)
Expand Down Expand Up @@ -228,17 +228,17 @@ async def async_read_message(self, targets: list[str] | None = None, **kwargs):
await self.coordinator.async_update_xplora_data(new_data=old_state)

async def _fetch_chat_voice(self, watch_id: str, msg_id: str) -> None:
voice: dict[str, Any] = await self.coordinator.controller.get_chat_voice(watch_id, msg_id)
voice = await self.coordinator.controller.get_chat_voice(watch_id, msg_id)
if voice:
encoded_base64_string_to_mp3_file(self._hass, voice, msg_id)

async def _fetch_chat_short_video(self, watch_id: str, msg_id: str) -> None:
video: dict[str, Any] = await self.coordinator.controller.get_short_video(watch_id, msg_id)
video = await self.coordinator.controller.get_short_video(watch_id, msg_id)
if video:
encoded_base64_string_to_file(self._hass, video, msg_id, "mp4", "video")
thumb: dict[str, Any] = await self.coordinator.controller.get_short_video_cover(watch_id, msg_id)
thumb = await self.coordinator.controller.get_short_video_cover(watch_id, msg_id)
if thumb:
encoded_base64_string_to_file(self._hass, thumb.get("fetchChatShortVideoCover"), msg_id, "jpeg", "video/thumb")
encoded_base64_string_to_file(self._hass, thumb, msg_id, "jpeg", "video/thumb")

async def _fetch_chat_image(self, watch, msg_id):
image = await self.coordinator.controller.get_chat_image(watch, msg_id)
Expand Down
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.1.6",
"homeassistant": "2024.2.0",
"hacs": "1.34.0",
"filename": "xplora_watch.zip"
}

0 comments on commit 0e72198

Please sign in to comment.