Skip to content

Commit

Permalink
Remove unneccesary fetch test
Browse files Browse the repository at this point in the history
coordinator.async_config_entry_first_refresh() does excactly the same:
test if fetch is successfull and if not raise ConfigEntryNotReady
  • Loading branch information
5ila5 committed Jul 13, 2024
1 parent 9e45a2e commit a2a5f22
Showing 1 changed file with 0 additions and 8 deletions.
8 changes: 0 additions & 8 deletions custom_components/waste_collection_schedule/init_ui.py
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,6 @@
import homeassistant.helpers.config_validation as cv
import homeassistant.util.dt as dt_util
from homeassistant.core import HomeAssistant, callback
from homeassistant.exceptions import ConfigEntryNotReady
from homeassistant.helpers.device_registry import DeviceEntryType, DeviceInfo
from homeassistant.helpers.dispatcher import dispatcher_send
from homeassistant.helpers.event import (
Expand Down Expand Up @@ -60,13 +59,6 @@ async def async_setup_entry(hass: HomeAssistant, entry) -> bool:
options.get(const.CONF_SOURCE_CALENDAR_TITLE),
)

try:
await hass.async_add_executor_job(shell.fetch)
except Exception as err: # pylint: disable=broad-except
ex = ConfigEntryNotReady()
ex.__cause__ = err
raise ex

coordinator = WCSCoordinator(
hass,
source_shell=shell,
Expand Down

0 comments on commit a2a5f22

Please sign in to comment.