Skip to content

Commit

Permalink
v1.0.3
Browse files Browse the repository at this point in the history
  • Loading branch information
Yiğit Topcu committed Apr 13, 2024
1 parent 4d99c69 commit adbe6ec
Show file tree
Hide file tree
Showing 4 changed files with 13 additions and 7 deletions.
2 changes: 1 addition & 1 deletion README.md
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,7 @@
[![Ko-Fi](https://img.shields.io/static/v1.svg?label=%20&message=Ko-Fi&color=F16061&logo=ko-fi&logoColor=white)](https://www.ko-fi.com/Tasshack)
[![PayPal.Me](https://img.shields.io/static/v1.svg?label=%20&message=PayPal.Me&logo=paypal)](https://paypal.me/Tasshackk)

![Dreame Logo](https://raw.githubusercontent.com/Tasshack/dreame-vacuum/dev/docs/media/logo.png "Dreame")
![Logo](https://raw.githubusercontent.com/Tasshack/dreame-vacuum/dev/docs/media/logo.png)

# Dreame vacuum integration for Home Assistant

Expand Down
14 changes: 10 additions & 4 deletions custom_components/dreame_vacuum/coordinator.py
Original file line number Diff line number Diff line change
Expand Up @@ -115,8 +115,8 @@ def __init__(
self.device.listen(
self._cleaning_paused_changed, DreameVacuumProperty.CLEANING_PAUSED
)
self.device.listen(self.async_set_updated_data)
self.device.listen_error(self.async_set_update_error)
self.device.listen(self.set_updated_data)
self.device.listen_error(self.set_update_error)

super().__init__(
hass,
Expand Down Expand Up @@ -284,15 +284,15 @@ def _create_persistent_notification(self, content, notification_id) -> None:
return


persistent_notification.async_create(
persistent_notification.create(
self.hass,
content,
title=self.device.name,
notification_id=f"{DOMAIN}_{self.device.mac}_{notification_id}"
)

def _remove_persistent_notification(self, notification_id) -> None:
persistent_notification.async_dismiss(
persistent_notification.dismiss(
self.hass, f"{DOMAIN}_{self.device.mac}_{notification_id}")

def _notification_dismiss_listener(self, type, data) -> None:
Expand Down Expand Up @@ -336,6 +336,12 @@ async def _async_update_data(self) -> DreameVacuumDevice:
self.device = None
raise UpdateFailed(ex) from ex

def set_update_error(self, ex=None) -> None:
self.hass.loop.call_soon_threadsafe(self.async_set_update_error, ex)

def set_updated_data(self, device=None) -> None:
self.hass.loop.call_soon_threadsafe(self.async_set_updated_data, device)

@callback
def async_set_updated_data(self, device=None) -> None:
if self._has_temporary_map != self.device.status.has_temporary_map:
Expand Down
2 changes: 1 addition & 1 deletion custom_components/dreame_vacuum/manifest.json
Original file line number Diff line number Diff line change
Expand Up @@ -19,5 +19,5 @@
"tzlocal",
"paho-mqtt"
],
"version": "v1.0.2"
"version": "v1.0.3"
}
2 changes: 1 addition & 1 deletion info.md
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,7 @@
[![Ko-Fi](https://img.shields.io/static/v1.svg?label=%20&message=Ko-Fi&color=F16061&logo=ko-fi&logoColor=white)](https://www.ko-fi.com/Tasshack)
[![PayPal.Me](https://img.shields.io/static/v1.svg?label=%20&message=PayPal.Me&logo=paypal)](https://paypal.me/Tasshackk)

![Dreame Logo](https://raw.githubusercontent.com/Tasshack/dreame-vacuum/dev/docs/media/logo.png "Dreame")
![Logo](https://raw.githubusercontent.com/Tasshack/dreame-vacuum/dev/docs/media/logo.png)

# Dreame vacuum integration for Home Assistant

Expand Down

0 comments on commit adbe6ec

Please sign in to comment.