#NEWLINE# def setup_component( hass , domain , config = None ) : #NEWLINE# #INDENT# 'Setup a component and all its dependencies.' #NEWLINE# if ( domain in hass . config . components ) : #NEWLINE# #INDENT# return True #NEWLINE# #UNINDENT# _ensure_loader_prepared ( hass ) #NEWLINE# if ( config is None ) : #NEWLINE# #INDENT# config = defaultdict ( dict ) #NEWLINE# #UNINDENT# components = loader . load_order_component ( domain ) #NEWLINE# if ( not components ) : #NEWLINE# #INDENT# return False #NEWLINE# #UNINDENT# for component in components : #NEWLINE# #INDENT# if ( not _setup_component ( hass , component , config ) ) : #NEWLINE# #INDENT# return False #NEWLINE# #UNINDENT# #UNINDENT# return True