#NEWLINE# def _turn_on_rgb_and_w( self , hex_template , **kwargs ) : #NEWLINE# #INDENT# 'Turn on RGB or RGBW child device.' #NEWLINE# rgb = self . _rgb #NEWLINE# white = self . _white #NEWLINE# if ( ( ATTR_RGB_WHITE in kwargs ) and ( kwargs [ ATTR_RGB_WHITE ] != self . _white ) ) : #NEWLINE# #INDENT# white = kwargs [ ATTR_RGB_WHITE ] #NEWLINE# #UNINDENT# if ( ( ATTR_RGB_COLOR in kwargs ) and ( kwargs [ ATTR_RGB_COLOR ] != self . _rgb ) ) : #NEWLINE# #INDENT# rgb = kwargs [ ATTR_RGB_COLOR ] #NEWLINE# if ( ( white is not None ) and ( hex_template == '%02x%02x%02x%02x' ) ) : #NEWLINE# #INDENT# rgb . append ( white ) #NEWLINE# #UNINDENT# hex_color = ( hex_template % tuple ( rgb ) ) #NEWLINE# self . gateway . set_child_value ( self . node_id , self . child_id , self . value_type , hex_color ) #NEWLINE# #UNINDENT# if self . gateway . optimistic : #NEWLINE# #INDENT# self . _rgb = rgb #NEWLINE# self . _white = white #NEWLINE# self . update_ha_state ( )