Skip to content

Commit

Permalink
Do not call async_delete_issue() if there is no issue to delete in Sh…
Browse files Browse the repository at this point in the history
…elly integration (home-assistant#120762)

Co-authored-by: Maciej Bieniek <[email protected]>
  • Loading branch information
bieniu and bieniu authored Jun 28, 2024
1 parent f4224a0 commit c029c53
Showing 1 changed file with 6 additions and 5 deletions.
11 changes: 6 additions & 5 deletions homeassistant/components/shelly/coordinator.py
Original file line number Diff line number Diff line change
Expand Up @@ -377,12 +377,13 @@ def _async_handle_update(
eager_start=True,
)
elif update_type is BlockUpdateType.COAP_PERIODIC:
if self._push_update_failures >= MAX_PUSH_UPDATE_FAILURES:
ir.async_delete_issue(
self.hass,
DOMAIN,
PUSH_UPDATE_ISSUE_ID.format(unique=self.mac),
)
self._push_update_failures = 0
ir.async_delete_issue(
self.hass,
DOMAIN,
PUSH_UPDATE_ISSUE_ID.format(unique=self.mac),
)
elif update_type is BlockUpdateType.COAP_REPLY:
self._push_update_failures += 1
if self._push_update_failures == MAX_PUSH_UPDATE_FAILURES:
Expand Down

0 comments on commit c029c53

Please sign in to comment.