mirror of
https://github.com/home-assistant/core.git
synced 2025-07-22 20:57:21 +00:00
Do not call async_delete_issue() if there is no issue to delete in Shelly integration (#120762)
Co-authored-by: Maciej Bieniek <478555+bieniu@users.noreply.github.com>
This commit is contained in:
parent
f4224a0327
commit
c029c534d6
@ -377,12 +377,13 @@ class ShellyBlockCoordinator(ShellyCoordinatorBase[BlockDevice]):
|
|||||||
eager_start=True,
|
eager_start=True,
|
||||||
)
|
)
|
||||||
elif update_type is BlockUpdateType.COAP_PERIODIC:
|
elif update_type is BlockUpdateType.COAP_PERIODIC:
|
||||||
self._push_update_failures = 0
|
if self._push_update_failures >= MAX_PUSH_UPDATE_FAILURES:
|
||||||
ir.async_delete_issue(
|
ir.async_delete_issue(
|
||||||
self.hass,
|
self.hass,
|
||||||
DOMAIN,
|
DOMAIN,
|
||||||
PUSH_UPDATE_ISSUE_ID.format(unique=self.mac),
|
PUSH_UPDATE_ISSUE_ID.format(unique=self.mac),
|
||||||
)
|
)
|
||||||
|
self._push_update_failures = 0
|
||||||
elif update_type is BlockUpdateType.COAP_REPLY:
|
elif update_type is BlockUpdateType.COAP_REPLY:
|
||||||
self._push_update_failures += 1
|
self._push_update_failures += 1
|
||||||
if self._push_update_failures == MAX_PUSH_UPDATE_FAILURES:
|
if self._push_update_failures == MAX_PUSH_UPDATE_FAILURES:
|
||||||
|
Loading…
x
Reference in New Issue
Block a user