#NEWLINE# def get_required_state( self , temp , heater_percent , cooler_percent , units = 'celsius' ) : #NEWLINE# #INDENT# new_heater_percent = heater_percent #NEWLINE# new_cooler_percent = cooler_percent #NEWLINE# if ( self . _lower_inside < temp < self . _upper_inside ) : #NEWLINE# #INDENT# new_heater_percent = 0 #NEWLINE# new_cooler_percent = 0 #NEWLINE# #UNINDENT# else : #NEWLINE# #INDENT# if ( temp > self . _upper_inside ) : #NEWLINE# #INDENT# if ( temp > self . _upper_outside ) : #NEWLINE# #INDENT# new_heater_percent = 0 #NEWLINE# new_cooler_percent = 100 #NEWLINE# #UNINDENT# #UNINDENT# else : #NEWLINE# #INDENT# if ( temp < self . _lower_inside ) : #NEWLINE# #INDENT# if ( temp < self . _lower_outside ) : #NEWLINE# #INDENT# new_heater_percent = 100 #NEWLINE# new_cooler_percent = 0 #NEWLINE# #UNINDENT# #UNINDENT# #UNINDENT# #UNINDENT# return ( new_heater_percent , new_cooler_percent )