Perform some small Flu Near You cleanup (#33590)

This commit is contained in:
Aaron Bach 2020-04-03 11:47:42 -06:00 committed by GitHub
parent 6f7bd673fb
commit d1663f2733
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
3 changed files with 3 additions and 10 deletions

View File

@ -9,7 +9,6 @@ import voluptuous as vol
from homeassistant.config_entries import SOURCE_IMPORT
from homeassistant.const import CONF_LATITUDE, CONF_LONGITUDE
from homeassistant.core import callback
from homeassistant.exceptions import ConfigEntryNotReady
from homeassistant.helpers import aiohttp_client, config_validation as cv
from homeassistant.helpers.dispatcher import async_dispatcher_send
from homeassistant.helpers.event import async_track_time_interval
@ -90,13 +89,7 @@ async def async_setup_entry(hass, config_entry):
config_entry.data.get(CONF_LATITUDE, hass.config.latitude),
config_entry.data.get(CONF_LONGITUDE, hass.config.longitude),
)
try:
await fny.async_update()
except FluNearYouError as err:
LOGGER.error("Error while setting up integration: %s", err)
raise ConfigEntryNotReady
await fny.async_update()
hass.data[DOMAIN][DATA_CLIENT][config_entry.entry_id] = fny
hass.async_create_task(

View File

@ -52,7 +52,7 @@ class FluNearYouFlowHandler(config_entries.ConfigFlow, domain=DOMAIN):
user_input[CONF_LATITUDE], user_input[CONF_LONGITUDE]
)
except FluNearYouError as err:
LOGGER.error("Error while setting up integration: %s", err)
LOGGER.error("Error while configuring integration: %s", err)
return self.async_show_form(
step_id="user", errors={"base": "general_error"}
)

View File

@ -2,7 +2,7 @@
import logging
DOMAIN = "flunearyou"
LOGGER = logging.getLogger("homeassistant.components.flunearyou")
LOGGER = logging.getLogger(__package__)
DATA_CLIENT = "client"