'Update the controller with values from RGB or RGBW child.'

def _update_rgb_or_w(self):

    set_req = self.gateway.const.SetReq
    value = self._values[self.value_type]
    if ((len(value) != 6) and (len(value) != 8)):
        _LOGGER.error('Wrong    value    %s    for    %s', value, set_req(self.value_type).name)
        return
    color_list = rgb_hex_to_rgb_list(value)
    if ((set_req.V_LIGHT not in self._values) and (set_req.V_DIMMER not in self._values)):
        self._state = (max(color_list) > 0)
    if (len(color_list) > 3):
        if (set_req.V_RGBW != self.value_type):
            _LOGGER.error('Wrong    value    %s    for    %s', value, set_req(self.value_type).name)
            return
        self._white = color_list.pop()
    self._rgb = color_list
