def setup_hass_instance(emulated_hue_config):
 hass = get_test_home_assistant()
 run_coroutine_threadsafe(core_components.async_setup(hass, {core.DOMAIN: {}}), hass.loop).result()
 bootstrap.setup_component(hass, http.DOMAIN, {http.DOMAIN: {http.CONF_SERVER_PORT: HTTP_SERVER_PORT}})
 bootstrap.setup_component(hass, emulated_hue.DOMAIN, emulated_hue_config)
 return hass

def setup_hass_instance ( emulated_hue_config ) : hass = get_test_home_assistant ( ) run_coroutine_threadsafe ( core_components . async_setup ( hass , { core . DOMAIN : { } } ) , hass . loop ) . result ( ) bootstrap . setup_component ( hass , http . DOMAIN , { http . DOMAIN : { http . CONF_SERVER_PORT : HTTP_SERVER_PORT } } ) bootstrap . setup_component ( hass , emulated_hue . DOMAIN , emulated_hue_config ) return hass
set up the home assistant instance to test .