async def async_setup(opp, config): """Set up the versasense component.""" session = aiohttp_client.async_get_clientsession(opp) consumer = pyv.Consumer(config[DOMAIN]["host"], session) opp.data[DOMAIN] = {KEY_CONSUMER: consumer} await _configure_entities(opp, config, consumer) # Return boolean to indicate that initialization was successful. return True
async def async_setup(hass: HomeAssistant, config: ConfigType) -> bool: """Set up the versasense component.""" session = aiohttp_client.async_get_clientsession(hass) consumer = pyv.Consumer(config[DOMAIN]["host"], session) hass.data[DOMAIN] = {KEY_CONSUMER: consumer} await _configure_entities(hass, config, consumer) # Return boolean to indicate that initialization was successful. return True