Skip to content

Commit

Permalink
Change UpdateFailed to ConfigEntryNotReady to try to improve unavaila…
Browse files Browse the repository at this point in the history
…ble issue. Bump omnilogic api version fixes #14
  • Loading branch information
djtimca committed Jun 9, 2022
1 parent 1c85362 commit da721e2
Show file tree
Hide file tree
Showing 2 changed files with 4 additions and 3 deletions.
5 changes: 3 additions & 2 deletions custom_components/omnilogic/common.py
Original file line number Diff line number Diff line change
Expand Up @@ -8,6 +8,7 @@

from homeassistant.config_entries import ConfigEntry
from homeassistant.core import HomeAssistant
from homeassistant.exceptions import ConfigEntryNotReady
from homeassistant.helpers.entity import DeviceInfo
from homeassistant.helpers.update_coordinator import (
CoordinatorEntity,
Expand Down Expand Up @@ -49,10 +50,10 @@ async def _async_update_data(self):
data = await self.api.get_telemetry_data()

except OmniLogicException as error:
raise UpdateFailed(f"Error updating from OmniLogic: {error}") from error
raise ConfigEntryNotReady(f"Error updating from OmniLogic: {error}") from error

except TimeoutError as error:
raise UpdateFailed(f"Timeout updating OmniLogic from cloud: {error}") from error
raise ConfigEntryNotReady(f"Timeout updating OmniLogic from cloud: {error}") from error

parsed_data = {}

Expand Down
2 changes: 1 addition & 1 deletion custom_components/omnilogic/manifest.json
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@
"config_flow": true,
"version": "1.0",
"documentation": "https://www.home-assistant.io/integrations/omnilogic",
"requirements": ["omnilogic==0.4.6"],
"requirements": ["omnilogic==0.4.7"],
"codeowners": ["@oliver84","@djtimca","@gentoosu"],
"issue_tracker": "https://github.com/djtimca/haomnilogic/issues",
"iot_class": "cloud_polling"
Expand Down

0 comments on commit da721e2

Please sign in to comment.