Skip to content

Commit

Permalink
Hotfix for 117
Browse files Browse the repository at this point in the history
  • Loading branch information
ludeeus committed Oct 28, 2020
1 parent 9ff1f51 commit 36e18b1
Showing 1 changed file with 8 additions and 2 deletions.
10 changes: 8 additions & 2 deletions custom_components/hacs/operational/setup.py
Original file line number Diff line number Diff line change
Expand Up @@ -110,7 +110,10 @@ async def async_startup_wrapper_for_yaml():
.replace("-", "_")
)
hacs.log.info("Could not setup HACS, trying again in 15 min")
async_call_later(hacs.hass, 900, async_startup_wrapper_for_yaml())
if int(hacs.system.ha_version.split(".")[1]) >= 117:
async_call_later(hacs.hass, 900, async_startup_wrapper_for_yaml())

This comment has been minimized.

Copy link
@make-all

make-all Oct 29, 2020

Is this the right way around? It changes behaviour for 0.116 and earlier, and leaves 0.117 and later with the previous behaviour. The other change below is the other way around.

else:
async_call_later(hacs.hass, 900, async_startup_wrapper_for_yaml)
return
hacs.system.disabled = False

Expand Down Expand Up @@ -180,7 +183,10 @@ async def async_hacs_startup():

# Setup startup tasks
if hacs.status.new:
async_call_later(hacs.hass, 5, hacs.startup_tasks())
if int(hacs.system.ha_version.split(".")[1]) >= 117:
async_call_later(hacs.hass, 5, hacs.startup_tasks)
else:
async_call_later(hacs.hass, 5, hacs.startup_tasks())
else:
hacs.hass.bus.async_listen_once(EVENT_HOMEASSISTANT_STARTED, hacs.startup_tasks)

Expand Down

0 comments on commit 36e18b1

Please sign in to comment.