Skip to content

Commit

Permalink
Check for hass.state == RUNNING (#1879)
Browse files Browse the repository at this point in the history
  • Loading branch information
ludeeus committed Feb 7, 2021
1 parent 7b78101 commit 7eb1373
Showing 1 changed file with 6 additions and 1 deletion.
7 changes: 6 additions & 1 deletion custom_components/hacs/operational/setup.py
Original file line number Diff line number Diff line change
Expand Up @@ -195,7 +195,12 @@ async def async_hacs_startup():
if hacs.status.new or hacs.configuration.config_type == "flow":
async_call_later(hacs.hass, 5, hacs.startup_tasks)
else:
hacs.hass.bus.async_listen_once(EVENT_HOMEASSISTANT_STARTED, hacs.startup_tasks)
if hacs.hass.state == "RUNNING":
async_call_later(hacs.hass, 5, hacs.startup_tasks)
else:
hacs.hass.bus.async_listen_once(
EVENT_HOMEASSISTANT_STARTED, hacs.startup_tasks
)

# Set up sensor
await async_add_sensor()
Expand Down

0 comments on commit 7eb1373

Please sign in to comment.